subtext_url, opens that person’s real session, and walks the decisive moments with screenshots, the component tree, network, and console. Mixpanel detects; Subtext diagnoses.
This guide assumes the Subtext capture snippet is installed and the Mixpanel JS SDK is initialized.
Attach the session URL
Store the current Subtext session URL on your Mixpanel data so it travels with the signal. There are three places to attach it, depending on how precise the link needs to be.On the user profile
Attach the URL to the Mixpanel person profile withmixpanel.people.set. Call it wherever your app already identifies the user — after identity resolves, not at module top level, and never for an anonymous user.
On every event
Register the URL as a super property and it rides along on every subsequent event automatically. The value is frozen at registration time.mixpanel.unregister('subtext_url').
On a specific event
When the exact moment matters, pass the URL directly on a singletrack call. url.now carries a timestamp, so the link opens the replay at that instant — ideal for high-signal events like errors, rage clicks, and conversion failures.
From signal to session
However you first hear about a problem in Mixpanel, the path is the same: get to thesubtext_url, then hand it to your agent for a Detect-vs-Diagnose read. Mixpanel flagged the drop or spike; the session shows the actual cause.
A Mixpanel Insights alert
A Mixpanel Insights alert
A Mixpanel alert fires by email or Slack: “
Purchase is down 20% vs. the 7-day average.”From the alert, open the report and build or filter to users who started but didn’t purchase. Open a user profile, find subtext_url in the properties list, and copy it. Grab several, then hand them to your agent:A scheduled board digest
A scheduled board digest
The team’s Mixpanel board arrives on a schedule and the digest shows a key conversion sliding over the week.Click into the report, segment to the affected users, open their profiles, and copy
subtext_url.A funnel drop-off drill-down
A funnel drop-off drill-down
You build a Mixpanel funnel, spot a steep drop at one step, and click into the non-converters.Open a non-converting user’s profile and copy
subtext_url.For agents
An autonomous agent can run the whole loop against Mixpanel directly: discover the friction, extract thesubtext_url, and hand each session to the Subtext MCP.
Mixpanel ships an official MCP server (hosted) documented at docs.mixpanel.com/docs/mcp, authenticated with OAuth or a Service Account (Service Account authentication for the MCP server is still in beta). It’s good for natural-language discovery over funnels, flows, and session replays, and its tool registry is documented on the same page — Run-Query executes insights, funnels, flows, and retention queries, Get-Report retrieves saved reports, and Get-User-Replays-Data analyzes a user’s session replays. None of the published MCP tools read individual profile properties, though. For deterministic subtext_url extraction, drive the REST Query and Engage APIs below, and use a Service Account for a headless agent.
1
Discover who is affected
Hit the Query API to locate friction. Query a saved report via the Insights Query API —
GET /api/query/insights with project_id and bookmark_id — to read per-step conversion from a saved Funnels report, and use /api/query/retention for retention. The base host is https://mixpanel.com/api/query/... (US) or https://eu.mixpanel.com/api/query/... (EU), authenticated with Service Account Basic auth plus project_id. Avoid the Funnels (/api/query/funnels), Segmentation (/api/query/segmentation), and JQL (/api/query/jql) endpoints for new work — they’re all in maintenance mode.2
Extract the session URL
Read
subtext_url per user from the Engage (Query Profiles) API:output_properties returns just that property for a smaller, faster payload. To find every user with a session attached, pass a where filter like defined(properties["subtext_url"]).3
Hand off to Subtext
For each URL, call
review-open(session_url=<subtext_url>) on the Subtext MCP. Event-level URLs are moment-precise, so the review opens exactly when the signal fired.subtext_url only round-trips if it was attached at capture time (see Attach the session URL). Match your region host (mixpanel.com vs eu.mixpanel.com / in.mixpanel.com) for both the Query and Engage APIs, and prefer a Service Account over OAuth for headless agents.Related
- Session Review overview — what your agent does once a session is open.
- Install the capture snippet — required before any session URL exists to attach.

