PostHog, Mixpanel & Amplitude Bridge
Your product analytics tool tells you what happened. MousePlayer shows you why. This bridge connects the two in both directions, so a drop-off in a funnel is one click away from the recording that explains it.
1. The Problem: Numbers Without Faces
Product analytics gives you a funnel: 1,000 users reached checkout, 620 abandoned it. That is a precise measurement of a problem you still cannot see. Watching a handful of those 620 recordings usually answers the question in minutes — but only if you can get from the chart to the right sessions without exporting IDs and searching by hand.
The Product Analytics Bridge removes that gap. It runs inside mp.js and links the two systems automatically:
- Outbound: every event your analytics tool records carries a
mouseplayer_session_urlproperty. Open any event, click the link, watch the session. - Inbound: the visitor's
distinct_idis read back and stored on the MousePlayer session, so recordings become searchable by the same identity you already use in PostHog, Mixpanel or Amplitude.
No code required. The bridge detects the analytics SDK on its own. You do not call any MousePlayer function, and you do not have to change how you track events.
2. Activation
Method A: Dashboard (No-Code)
- Open your project and go to the Integrations tab.
- Toggle PostHog, Mixpanel & Amplitude Bridge to
ON. - Select the platform you use. Changes are saved automatically.
The setting takes effect on the next page load of your website. Existing sessions are not affected retroactively.
Method B: Manual Script Configuration
If you prefer to hardcode it, set the two values inside window.mp_config:
3. What Happens Per Platform
Each platform exposes a different API, so the bridge maps to the idiomatic call for each one. You do not need to configure this — it follows your provider selection.
| Platform | Outbound (replay URL) | Inbound (identity) |
|---|---|---|
| PostHog | posthog.register() — registered as a super property, so it is attached to every subsequent event |
posthog.get_distinct_id() |
| Mixpanel | mixpanel.register() — same super property behaviour |
mixpanel.get_distinct_id() |
| Amplitude | setUserProperties() — set as a user property |
getDeviceId(), falling back to getInstance().options.deviceId on the legacy SDK |
Super property vs. user property: in PostHog and Mixpanel the replay URL is attached to events going forward, so you will find it on every event fired after the bridge initialises — not on events that were already sent earlier in the page load.
4. Identity: From distinct_id to a Named Session
The inbound half is the part most teams underestimate. Without it, MousePlayer sessions are anonymous: you can watch them, but you cannot answer "show me the recordings of the account that churned last week."
Once the bridge is active, the distinct_id from your analytics tool is written to the session's custom_user_id field — the same field the manual SDK call writes to:
If you already call mp('set') yourself, keep doing so. An identity you provide explicitly is the more reliable one, because it is your own primary key rather than a per-browser analytics identifier.
Privacy note: only the identifier your analytics tool has already assigned is transferred. No email address, name or other personal field is read from the SDK. Make sure your own privacy policy covers this processing, and gate the tracking script behind your consent tool if you rely on consent as your legal basis.
5. Technical Behaviour
Analytics SDKs are usually loaded asynchronously, often after mp.js is already running. A single attempt at startup would therefore fail on most real websites.
- The bridge retries every 1.5 seconds, up to ten times, and stops as soon as both directions have completed.
- Each direction settles independently, so the replay URL is never sent twice while waiting for an identity to appear.
- If the SDK never appears, the bridge gives up silently after roughly 15 seconds. Nothing is written to the console and session recording continues unaffected.
- Identifiers longer than 128 characters are ignored rather than truncated, to avoid storing half an identifier that would never match anything.
6. Verifying It Works
- Open your website in a normal browser tab and interact with it briefly.
- In your analytics tool, open the newest event and look for the
mouseplayer_session_urlproperty. Opening it should take you straight to the recording. - In MousePlayer, open User Explorer. Sessions that carry an identity show it instead of the generated visitor nickname.
If nothing shows up
- The property is missing on all events: check that the analytics SDK actually loads on the page, and that you selected the matching platform. A PostHog selection will not read Mixpanel.
- The property appears only on later events: that is expected, see the note in section 3.
- The URL is there but the identity is not: your SDK has not assigned a
distinct_idyet, which is normal before a user is identified. It will be picked up on a later page load. - You are testing as a logged-in administrator: some setups exclude internal traffic. Try a private window.
All trademarks named here belong to their respective owners. MousePlayer has no business relationship with these providers.