Analyze RightMessage tests in PostHog
You'll send every RightMessage A/B test version to PostHog as an exposure event, so you can analyze tests with PostHog experiments, funnels and insights.
Updated
View as MarkdownAnalyze RightMessage tests in PostHog alongside the product and revenue events you already track. RightMessage sends a custom exposure event each time it counts a visitor in a test version, so PostHog knows which version each person saw.
This covers page and audience A/B tests, campaign holdbacks, and question, form, offer and flow split tests. You can turn on the PostHog app on every plan, but impressions come only from holdbacks and A/B tests (Scale and Pro) and split tests (Pro). Holdbacks need Scale or Pro, and starting an A/B test needs Pro.
Turn on the PostHog app
- Open Integrations, then Other integrations.
- On the PostHog card, choose Enable.
- Publish your changes.
RightMessage uses the posthog object already on your page. Load and initialize PostHog before RightMessage counts the visitor, or the event is skipped. See send events and contact data to PostHog for the other events.
What PostHog receives
$feature/rm-<experienceId>holds the version ID. PostHog experiments read this property, andrm-<experienceId>is the feature flag key to use.rm_experience_kindisholdback,original_test,audience_test,flow_test,question_testoroffer_test.rm_campaign_idorrm_resource_idappears when there is one.
To find a test's flag key, open the campaign's Testing tab and open Send to your analytics on the test. It shows the PostHog feature flag, each version's GA4 experiment string, and Preview this version on your site.
Analyze a test in PostHog
- In PostHog, create an experiment, or an insight broken down by the
$feature/rm-<experienceId>property. - For an experiment, use
rm_experience_impressionas a custom exposure event and set the feature flag key torm-<experienceId>. The variant keys are RightMessage's version IDs, such ascontrol. - Pick the metric you care about from your own PostHog events.
RightMessage decides who sees which version. PostHog only analyzes the results, so don't let a PostHog flag also split the same traffic. Check PostHog's experiments documentation for the current setup screens.
Check that impressions arrive
Visit a page with a running test in a browser that isn't excluded, then look for rm_experience_impression in PostHog's activity view.
Nothing is sent from an excluded browser, in previews or debugger sessions, before cookie consent when the project waits for consent, or when posthog.capture isn't on the page.
PostHog's results are your own analysis. RightMessage's verdicts use its own weekly checks. See read A/B test results. For Google tools, see GA4 and Google Tag Manager.