subtext_url, opens that person’s real session, and walks the decisive moments with screenshots, the component tree, network, and console. Your warehouse and audiences detect; Subtext diagnoses.
This guide assumes the Subtext capture snippet is installed and capturing sessions, and Segment Analytics.js (
analytics.js or @segment/analytics-next) is initialized.Attach the session URL
Store the current Subtext session URL on your Segment data so it travels with every trait and event into your warehouse and downstream tools. There are two places to attach it, depending on how precise the link needs to be.On the user profile
Attach the URL to the Segment user profile viaanalytics.identify. Call it wherever your app already identifies the user — on auth resolution, not at module top level. Segment accepts any trait key, so use subtext_url; the warehouse connector snake_cases column names anyway, so it lands as subtext_url there.
On every event
Segment source middleware runs on every call, letting you attach the URL fresh per event. Becauseurl.now carries a timestamp, the link deep-links to the moment each event fired. Register the middleware once at app initialization, before any track calls.
From signal to session
Segment is plumbing, so you never hear about a problem in Segment — you hear about it in a downstream surface: a warehouse dashboard, a computed audience, a data-quality alert. However it reaches you, the path is the same: get to thesubtext_url, then hand it to your agent for a Detect-vs-Diagnose read. The data says this user dropped or errored; the session shows what they actually experienced.
A BI dashboard flags a funnel drop
A BI dashboard flags a funnel drop
The analyst or growth PM reviewing the weekly funnel in Looker, Mode, or Hex sees the Grab a few, then hand them to your agent:
checkout funnel — built on Segment events in the warehouse — converting below trend.Query the event table for the affected users’ sessions:A user enters a 'failed' audience in Engage
A user enters a 'failed' audience in Engage
The lifecycle or CRM owner sees a user land in a computed audience like Started checkout, no purchase in 24h in Twilio Engage (or a connected tool), and wants to know why before triggering a win-back.Open the user’s profile in Segment, go to Traits, and copy
subtext_url.A Protocols data-quality alert
A Protocols data-quality alert
The data engineer who owns tracking quality gets a Segment Protocols violation — a key event firing with malformed or missing properties, suggesting a broken client.Find a recent offending event in the source debugger or warehouse; if it carries
subtext_url, copy it.For agents
An autonomous agent can run the whole loop against Segment directly: discover the friction, extract thesubtext_url, and hand each session to the Subtext MCP. There is no official Segment CDP data MCP — don’t assume one exists. The only Segment-related MCP is the Twilio MCP (mcp.twilio.com/docs), a read-only documentation index whose twilio__search and twilio__retrieve tools return API specs and schemas; it helps you find the right Segment endpoint but can’t read a trait or query an audience. The practical stance is to call Segment’s REST and warehouse directly, optionally using the Twilio docs MCP to look up exact request shapes.
1
Discover the friction
Segment has no native funnel API — it’s plumbing, not an analytics product. Compute drop-offs with warehouse SQL over the warehouse Or surface at-risk segments with computed and predictive traits via the Profile API (
tracks tables:?class=computed_trait, ?class=audience).2
Extract the session URL
Read
subtext_url per user from the Profile API:include=subtext_url returns just that trait (default page size is 10 traits; ?limit=200 max). This is server-side only — no CORS. For event-level, moment-linked URLs, query the subtext_url column on the event-specific table (e.g. segment.<source>.checkout_started) instead — custom Track properties land as un-prefixed columns on <source>.<event> tables, not on tracks.3
Hand off to Subtext
For each URL, call
review-open(session_url=<subtext_url>) on the Subtext MCP, step through the drop, and return a Detect-vs-Diagnose read: the warehouse says they dropped, the session shows what they experienced.subtext_url only round-trips if it was attached as a user trait or event property at capture time (see Attach the session URL). Match your region for the API host (profiles.segment.com vs profiles.euw1.segment.com). Event-level links from the warehouse event tables are moment-precise; user-trait links open at session start.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.

