Connecting Contentful to Segment
Contentful is headless content only — it has no checkout, no orders and no customers, which is the single most important thing to establish before anyone quotes for work. Segment is a customer data platform rather than an ad network, so sending to it is not about matching a conversion — it is about putting one clean event where every other destination can read it. The join between them succeeds or fails on one thing: whether the userId and anonymousId reaches the front-end conversion, not a Contentful record before the conversion happens, because Segment can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Contentful and Segment: page calls on route change, IDs from auth
For Segment on a Contentful site, call analytics.js page on every route change with entry ID, content type and locale as properties. The userId comes from auth, commerce or CRM, and server-side track calls for orders or leads must reuse it. Share the anonymousId cookie across subdomains, capture click IDs and consent on landing, and keep publish webhooks out.
Segment on a Contentful site lives entirely in the front end and the backend systems; Contentful contributes properties, not events. The analytics.js page call is the first thing to check, because on a client-routed Next.js or Nuxt app it fires once on load unless you call it on every navigation. Every downstream destination inherits that one-page-per-session view, so fixing it in Segment fixes it everywhere at once.
Add the Contentful entry ID, content type and locale as page properties so warehouse and analytics destinations can group by content. The anonymousId is set by analytics.js on the front end; the userId has to come from your auth, commerce or CRM system at the moment someone becomes known, and the server-side track calls for orders or leads must use that same userId. When the marketing site and the app sit on different subdomains, confirm the anonymousId cookie is shared, or the alias never connects content to customer.
Capture click identifiers and consent state on first landing and send them as properties or traits, so destinations that need gclid, fbc or rdt_cid can read them later. Keep Contentful's own webhooks out of Segment unless you deliberately want publish activity in the warehouse; routed to ad destinations, an entry-published event is noise. Exclude preview deployments by write key.
Contentful → Segment · what breaks
Why this join usually fails — Contentful → Segment
- 01
The userId and anonymousId never reaches Contentful
Because Contentful is headless, the front end is a separate application — usually Next.js, Nuxt or similar — and that application is where client-side routing, caching and identifier capture all actually happen. Attributing a tracking problem to Contentful is nearly always a misdiagnosis.
- 02
Blaming the CMS for a front-end problem
Headless setups fail at the front end — client-side routing that fires one pageview per session, an identifier lost on a route change — and the CMS gets blamed. Contentful is not in that path at all.
- 03
One bad event multiplied across every destination
Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.
- 04
Nothing reconciles afterwards
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
Contentful → Segment · the fix
What working looks like — Contentful → Segment
The userId and anonymousId on every conversion
Conversions arriving in Segment
Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.
Reconciled against the source
Contentful → Segment · architecture
How Contentful and Segment actually connect
- 1
Contentful holds the truth
Contentful stores content and serves it via API. The commercial record lives in your commerce platform, your CRM or your billing system, and that is where measurement belongs.
- 2
Segment needs a click to match
Segment needs a consistent identity model — the same userId everywhere, an alias when an anonymous visitor becomes known, and event names that follow one spec. Feeding it inconsistent identities pushes the mess to every connected destination at once.
- 3
The identifier is the bridge
The userId and anonymousId, captured at the visit and carried into the front-end conversion, not a Contentful record.
- 4
The event source decides reliability
Send from the system that holds the money. Contentful contributes the content layer and nothing to the conversion.
- 5
Deduplication at the destination
Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.
Contentful → Segment · normal or broken
Working vs. broken, side by side — Contentful → Segment
Normal, not a fault
The userId and anonymousId present on the conversion
Sent from your commerce, CRM or billing system
Deduplicated correctly
Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.
Reconciles with the source
Actually broken
The userId and anonymousId missing on most records
Because Contentful is headless, the front end is a separate application — usually Next.js, Nuxt or similar — and that application is where client-side routing, caching and identifier capture all actually happen. Attributing a tracking problem to Contentful is nearly always a misdiagnosis.
Sent from the browser
Headless setups fail at the front end — client-side routing that fires one pageview per session, an identifier lost on a route change — and the CMS gets blamed. Contentful is not in that path at all.
Counted twice, or not at all
Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.
Nobody has reconciled it
Contentful → Segment · diagnose
Diagnostic order — Contentful → Segment
- 01
Count conversions carrying the userId and anonymousId
- 02
Follow one real conversion end to end
- 03
Establish which system holds the conversion before anything else
In a headless stack it is never the CMS, and starting there wastes the engagement.
- 04
Check identity resolution before checking anything downstream
If anonymousId is never aliased to userId, every destination sees two people where there is one, and no downstream fix helps.
- 05
Read the match rate, not the success message
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
Contentful → Segment · prove
How it gets proven — Contentful → Segment
Source of truth
Whatever system takes the money — Contentful holds none of it.
- The userId and anonymousId confirmed present on a live conversion.
- An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
- The conversion confirmed sourced from the commerce or CRM system rather than from anything in the content layer.
Contentful → Segment · free audit
What we check in the free audit
- Count conversions carrying the userId and anonymousId
- Follow one real conversion end to end
- Establish which system holds the conversion before anything else
- Check identity resolution before checking anything downstream
- Read the match rate, not the success message
Checked against
Whatever system takes the money — Contentful holds none of it.
Free30 minutesNo obligation
Contentful → Segment · when not to buy
When you don't need this — Contentful → Segment
- Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the userId and anonymousId.
- There is no Contentful-specific tracking build. The work is in your front-end framework and your commerce system, and we would say so rather than bill for the CMS.
- If you send to one or two destinations, Segment is infrastructure you do not need — direct integrations are simpler and cheaper. It earns its place at genuine fan-out.
Contentful → Segment · what we deliver
What gets built — Contentful → Segment
Identifier capture into Contentful
Capture and persist the identifier in the front-end application, server-side, and carry it into whichever system records the conversion.
Event source: your commerce, CRM or billing system
Send from the system that holds the money. Contentful contributes the content layer and nothing to the conversion.
Dispatch to Segment
Server-side track and identify calls with a stable messageId, consistent userId, and the click identifier carried as a trait or property.
Reversals where they exist
Handled wherever the money lives.
Written guarantee
95%+ tracking accuracy
Measured against Whatever system takes the money — Contentful holds none of it.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Contentful → Segment questions, answered
Not for conversion tracking. Segment collects from your front end and backend; add Contentful entry IDs as page properties. Check Segment's catalog if you want content records themselves in your warehouse.
analytics.page is only called on the initial load. Call it on every client-side route change in your front-end framework.
Almost always because the userId and anonymousId never reached the front-end conversion, not a Contentful record. Because Contentful is headless, the front end is a separate application — usually Next.js, Nuxt or similar — and that application is where client-side routing, caching and identifier capture all actually happen. Attributing a tracking problem to Contentful is nearly always a misdiagnosis. Measure coverage before debugging the dispatch.
Segment identifies people by anonymousId before they are known and userId afterwards, and the alias between them is what stitches a session to a customer. Click identifiers travel as event properties or traits rather than as a matching key — Segment does not match anything itself, it forwards. That distinction changes the whole design: get the identity resolution right and every downstream destination inherits it.
Your commerce, CRM or billing system. Send from the system that holds the money. Contentful contributes the content layer and nothing to the conversion.
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
More on Contentful → Segment
- Stripe → SegmentConnecting Stripe to Segment
- PayPal → SegmentConnecting PayPal to Segment
- Shopify → SegmentConnecting Shopify to Segment
RELATED GUIDES
Where Contentful → Segment fits in the rest of your tracking
- Webflow → SegmentConnecting Webflow to Segment
- Umbraco → SegmentConnecting Umbraco to Segment
- Sitecore → SegmentConnecting Sitecore to Segment
- Contentful → BigQueryConnecting Contentful to BigQuery
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- AEM → SegmentConnecting Adobe Experience Manager to Segment
- Sanity → SegmentConnecting Sanity to Segment
- Ghost → SegmentConnecting Ghost memberships to Segment
Free · 30 min
Get Contentful and Segment joined properly
Free30 minutesNo obligation
