Send events and contact data to PostHog
You'll see RightMessage interactions alongside your other PostHog events, with contact details attached when RightMessage knows the visitor's email.
Updated
View as MarkdownSee how visitors interact with your RightMessage questions and offers alongside the rest of their activity in PostHog. For identified visitors, you can also send contact data to help you understand who took each action.
Install and initialize PostHog's JavaScript library before the RightMessage interactions you want to capture happen. You'll also need the RightMessage snippet, permission to edit and publish your project, and access to incoming events in PostHog.
RightMessage uses the page's existing posthog object. The switch doesn't install PostHog or ask for its API key. Your website's consent and data-handling settings still apply.
Turn on forwarding
- In RightMessage, open Project settings (the gear at the bottom of the sidebar), then Integrations.
- Choose the Analytics tab.
- Turn on the PostHog switch.
- Review and publish your changes.
- Open your website and answer a question.
- Find
rm_question_answeredin PostHog's incoming events and check its properties.
To stop sending future RightMessage events, turn the switch off and publish again. This leaves PostHog's library and previously collected events in place.
Find your RightMessage events
PostHog receives these events when the corresponding interaction happens:
rm_offer_displayedwhen an offer is displayed.rm_question_displayedwhen a question is displayed.rm_question_answeredwhen a question is answered.rm_form_submittedwhen a form is submitted.rm_campaign_exposureandrm_campaign_conversionfor campaign events.rm_widget_dismissedwhen a widget is dismissed.rm_splittest_assignedfor split-test assignment.rm_experience_impressioneach time RightMessage counts the visitor in an A/B test version, holdback, or split test. See below.rm_set_custom_field,rm_add_tag, andrm_remove_tagfor the corresponding integration events.
Event properties use snake_case with an rm_ prefix. For example, questionId becomes rm_question_id. They include available resource names, such as question names. The exact properties depend on the event.
These names are specific to PostHog. Google Analytics and Fathom use different names. If you're testing a form, check the contact record in your email platform too. The form event doesn't confirm every provider action succeeded.
A/B test impressions
rm_experience_impression is a custom exposure event for PostHog experiments. Its properties are:
$feature/rm-<experienceId>: the version ID, such ascontrol. PostHog experiments read this property.rm_experience_id,rm_experience_kind,rm_experience_name,rm_variant_id,rm_variant_name, andrm_campaign_idorrm_resource_idwhen there is one.exp_variant_string:RM-<experienceId>-<variantId>.
Each test's Send to your analytics panel on the campaign's Testing tab shows its PostHog feature flag key. Impressions go only to an enabled, published PostHog app, and aren't sent for an excluded browser, in previews or debugger sessions, or before cookie consent. See analyze tests in PostHog.
Check that contacts are identified
- In a clean browser, follow your configured identification steps with a test contact you control.
- Inspect that person's PostHog identity and properties.
- Confirm the expected email and RightMessage visitor ID.
When RightMessage has an email address, it uses that email as the PostHog distinct ID and sends rm_visitor_id and rm_email. Available segment IDs, tag names, list names, and custom fields go into rm_segments, rm_tags, rm_lists, and rm_custom_fields.
Without an email, this integration doesn't identify the visitor in PostHog. List names are identity properties, not separate list-membership events.
When you can see the test interaction and the expected contact properties in PostHog, forwarding is working.
If events aren't arriving
- Check that you've published the enabled switch.
- Check that
posthog.captureis available on the page when the interaction happens. - For identification, check that
posthog.identifyis available and RightMessage has the visitor's email. - Review script blocking, consent settings, and PostHog's setup.
RightMessage skips delivery if the required PostHog function isn't available, and catches delivery errors. There's no queue or replay control for missed events. Test on your website, not just in a dashboard preview.