Send Mixpanel data to Sequential

Keep the Mixpanel JavaScript SDK and point it at Sequential: your Sequential Mixpanel ingest key as the project token, plus api_host.

View as Markdown

Install with your AI agent

Copy a complete instruction for a coding agent (Claude Code, Cursor, Copilot…) with your repo open. It says how to find an existing install, what to change, and how to check events arrive, and it includes this page.

Keys are placeholders; the agent will ask for them.

On this page

Install

Pick only one of the three paths.

Already using Mixpanel

Do not add a second copy. In the mixpanel.init(…) call you already have, replace the project token and add api_host so events go to Sequential instead of Mixpanel.

js

mixpanel.init('YOUR_MIXPANEL_INGEST_KEY', { api_host: 'https://api.usesequential.com' });

Keep every other option you pass. If the init reads the token from an environment variable, change the variable instead of the code.

Content-Security-Policy

Only if the site sets a Content-Security-Policy. Add these origins to the directives it already has; do not replace them.

text

script-src https://api.usesequential.com https://cdn.mxpnl.com https://cdn.usesequential.com
connect-src https://api.usesequential.com

Add session replay (optional)

One line adds the recorder (/rec/recorder.js). It takes your replay ingest key (sq_replay_…), not the Mixpanel ingest key. The recorder picks up Mixpanel's session and user ids on its own, so every supported event (What is supported) lands on the replay timeline. Put it on every page you want to replay, after the SDK.

html

<script src="https://api.usesequential.com/rec/recorder.js/YOUR_REPLAY_INGEST_KEY"></script>

What it records and masks is set per project in Sequential (Settings › Recording & data), not in the page. See Add session replay to a website.

Check it works

  1. Web Load a page of the site in a normal browser.

  2. Open the network panel.

  3. Look for requests to the API URL (api_host) that answer 2xx.

Done when: In Sequential, step 3 of the project setup says "It works" when the first event arrives. Then your source's line on Settings › Setup says "receiving". The first event can take up to about a minute to appear.

If it does not work
SymptomCauseFix
A request answers 401The key is wrong, or belongs to another source. Every key works with one SDK only.Where the values come from
A request answers 403The request looked like a bot. Headless and automated browsers are rejected as bots.Load the page in a normal browser, not a headless or automated one.

What is supported

Support Capabilities
Yes Page / screen views; Autocaptured clicks & forms; Identify (user id); DevTools: errors, console, network, performance (with Sequential’s recorder)
Partial Custom events; Session replay (Sequential’s recorder, not Mixpanel’s own recording)
No User properties; Groups / accounts; Errors; Feature flags, surveys, experiments; Server-side SDKs
Full support table
What Sequential does with Mixpanel traffic
CapabilitySupportNotes
Custom eventsPartialmixpanel.track(name, props). Sequential drops properties whose names start with $ (except element properties).
Page / screen viewsYestrack_pageview / $mp_web_page_view.
Autocaptured clicks & formsYesMixpanel's autocapture clicks, submits, rage and dead clicks.
Identify (user id)Yesmixpanel.identify(id).
User propertiesNomixpanel.people.set from the browser SDK is not stored today: Sequential refuses its form-encoded /engage request. Tracked as a known issue.
Groups / accountsNoGroup profiles are not supported. Sequential stores a /groups update as user properties on a user with no id.
ErrorsNoNo error events; track them as custom events.
Session replayPartialMixpanel's own recording is not accepted (/record has no route). Add Sequential's recorder: it joins Mixpanel's session id automatically.
DevTools: errors, console, network, performanceYesCaptured by Sequential's recorder, after you add the recorder to the page.
Feature flags, surveys, experimentsNoNo /decide or flags route.
Server-side SDKsNoBrowser and PostHog mobile SDKs only. Sequential rejects server-side SDK user agents as bots (403). To send events from your own server, use Sequential’s backend SDK for Node.

Next steps