Skip to help content
RightMessage

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 Markdown

See 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

  1. Open Integrations in RightMessage.
  2. Select Other integrations.
  3. On the PostHog card, choose Enable.
  4. Review and publish your changes.
  5. Open your website and answer a question.
  6. Find rm_question_answered in PostHog's incoming events and check its properties.
Other integrations with Google Analytics, Fathom Analytics, PostHog, and Senja connection controlsOriginal
Other integrations with Google Analytics, Fathom Analytics, PostHog, and Senja connection controls

To stop sending future RightMessage events, choose Disable 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_displayed when an offer is displayed.
  • rm_question_displayed when a question is displayed.
  • rm_question_answered when a question is answered.
  • rm_form_submitted when a form is submitted.
  • rm_campaign_exposure and rm_campaign_conversion for campaign events.
  • rm_widget_dismissed when a widget is dismissed.
  • rm_splittest_assigned for split-test assignment.
  • rm_set_custom_field, rm_add_tag, and rm_remove_tag for 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.

Check that contacts are identified

  1. In a clean browser, follow your configured identification steps with a test contact you control.
  2. Inspect that person's PostHog identity and properties.
  3. 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

  1. Check that you've published the enabled switch.
  2. Check that posthog.capture is available on the page when the interaction happens.
  3. For identification, check that posthog.identify is available and RightMessage has the visitor's email.
  4. 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.

Still need a hand?

Tell us what you’re trying to do and where you’re getting stuck.

support@rightmessage.com