Mixpanel Session Replay: Setup, Privacy, and How to Actually Use It

Numbers tell you where users struggle. They almost never tell you why.

A funnel can show you that 38% of people abandon checkout at the shipping step. It can’t show you that the postcode field rejects a valid format, or that the “Continue” button sits below the fold on smaller phones, or that people keep clicking a shipping option that looks selectable but isn’t. For that, you need to watch.

That’s what Session Replay is for. Mixpanel added it so the replay sits right next to the event data, which means you can jump from “these 400 users dropped off” straight to watching a few of them do it.

This guide covers how Mixpanel’s Session Replay works, how to set it up without creating a privacy problem, and how to use it for analysis and tracking QA.

How Session Replay works (it’s not a video)

A common misconception is that replay records a video of the user’s screen. Mixpanel’s privacy documentation is explicit that web replay is not a video. Instead, it captures the structure of the page (the DOM) and the changes to it, then rebuilds the page during playback, applying recorded interactions at the moments they happened.

This matters for two reasons:

  1. Privacy controls work at the element level. Because the page is rebuilt from structure, specific elements can be masked or blocked before data leaves the browser.
  2. Playback can look slightly different from the original, for example when assets have changed since the session or when content was loaded from places replay doesn’t capture.

Setting it up on the web

Session Replay is built into the Mixpanel JavaScript SDK. Check Mixpanel’s docs for the minimum SDK version and for which plans include replay, since both have changed over time.

Step 1: Turn it on with sampling

The core setup is a single option in your existing init call:

mixpanel.init('YOUR_PROJECT_TOKEN', {
  record_sessions_percent: 10
});

This records a random 10% of sessions. Start low. Recording 100% on a high-traffic site fills your quota quickly, and you don’t need every session to find patterns; you need enough sessions of the right kind.

Step 2: Record the sessions that matter

Random sampling is fine for general discovery, but for focused investigations I prefer targeted recording. The SDK lets you start and stop recording programmatically:

// Default: record a small sample
mixpanel.init('YOUR_PROJECT_TOKEN', { record_sessions_percent: 1 });

// Always record when a user reaches checkout
if (isCheckoutPage) {
  mixpanel.start_session_recording();
}

Recording started this way continues for the rest of the session, not just the page where you triggered it. You can also use stop_session_recording() to pause capture, which is useful before a user enters a sensitive area.

This pattern gives you low baseline cost and full coverage of the flows you actually care about: checkout, onboarding, pricing.

Step 3: Connect replays to events from other tools

Events sent through the Mixpanel SDK are linked to replays automatically. If you send events from elsewhere (a CDP, server-side, another library), you can read the current replay properties from the SDK and attach the replay ID to those events so they line up with the right recording. Mixpanel’s docs include examples for CDPs such as Segment, RudderStack and mParticle.

Privacy: get this right before you launch

This section isn’t optional. Session Replay can capture what users see and type, and data privacy laws vary a lot between countries and states. Mixpanel itself recommends reviewing your privacy notice with legal counsel before you implement replay.

The good news is that Mixpanel’s defaults are privacy-first. Out of the box, text, inputs, images and video are masked; you have to opt in to revealing content.

Masking vs blocking

Mixpanel distinguishes between two controls:

  • Masking hides the content of an element (text appears as asterisks) but keeps the layout, so you can still see the structure of the page.
  • Blocking removes the element entirely and shows a placeholder box of similar size.

In both cases, interactions such as clicks on those elements are still captured, so you can see that someone clicked the payment field without seeing what’s in it.

Text masking vs input masking

These are configured separately. A sensible pattern for many sites is to unmask general page text so replays are readable, while keeping sensitive areas masked:

mixpanel.init('YOUR_PROJECT_TOKEN', {
  record_sessions_percent: 10,
  record_mask_all_text: false,
  record_mask_text_selector: ['.account-info', '#billing-section']
});

For inputs, keep everything masked and unmask only harmless fields such as a search box or quantity selector:

mixpanel.init('YOUR_PROJECT_TOKEN', {
  record_sessions_percent: 10,
  record_unmask_input_selector: ['#search-box', '.quantity-input']
});

To remove a component entirely, use the block selector option (for example, record_block_selector: '.sensitive-data'). Mixpanel also supports a CSS class for masking specific elements directly in your HTML.

My privacy checklist for clients

  • Keep all inputs masked by default. Unmask only fields you’ve reviewed one by one.
  • Block whole sections that show personal data: account pages, billing, health or financial details.
  • Stop recording on restricted areas such as admin panels or internal tools.
  • Update your privacy notice and, where required, your consent banner. Only start recording after consent if your jurisdiction requires it.
  • Review a sample of replays after launch to confirm nothing sensitive is visible. Configuration mistakes are easy to make and easy to spot.

Mobile replay

Mixpanel also offers replay for mobile apps through its native SDKs. Mobile privacy controls work differently; for example, Mixpanel’s iOS SDK lets you mark views as sensitive, and some input types can’t be unmasked at all. Read the platform-specific privacy docs before you enable it.

Using replay for analysis

The real value comes from jumping into replays from reports rather than browsing randomly. Mixpanel lets you open replays from user profiles and from within reports.

The workflow I use:

  1. Start with a number. Find the step in a funnel with the biggest drop-off.
  2. Open replays of users who dropped off at that step.
  3. Watch five to ten sessions and write down every moment of hesitation: rage clicks, scrolling up and down, re-typing, long pauses.
  4. Look for a pattern that appears in several sessions. One confused user is an anecdote; four with the same problem is a finding.
  5. Quantify it. If the pattern is “users click the disabled button,” add an event for that click and measure how common it really is.
  6. Fix, then compare the funnel before and after.

This is how replay and analytics complement each other: replay finds the hypothesis, events confirm it at scale.

Using replay for tracking QA

This is the use case most teams miss. Replay is excellent for debugging your own tracking (see post 11). When a client tells me an event “isn’t firing,” I find a replay of a user on that page and line it up against the events in their profile. Within a minute you can see whether the user actually performed the action, whether the event fired at the wrong moment, or whether it fired twice.

If you have Mixpanel’s MCP server connected to Claude, there’s a tool for analyzing a specific user’s replays alongside their event data. Asking “this user reported a bug, what happened in their last three sessions?” is a fast way to start a support investigation.

Mistakes to avoid

  • Recording 100% of sessions on day one and burning through your quota.
  • Turning off all masking because replays “look empty.” Unmask selectively instead.
  • Watching replays without a question. Random browsing feels productive and rarely is.
  • Treating one replay as proof. Always confirm patterns with event data.
  • Forgetting consent and privacy notices.

Final thoughts

Session Replay is at its best when it’s attached to a specific question your data has already raised. Set it up with conservative privacy defaults and targeted recording, use it to explain the drop-offs your funnels reveal, and then go back to the numbers to prove what you found.

Sources