Skip to main content
OneTrust → SegmentIntegration guide

Connecting OneTrust to Segment

OneTrust sits upstream of every tag on the site, which makes it the single system most able to change your conversion volume overnight without anybody touching a tag. 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 OneTrust consent 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

OneTrust consent passed through Segment to every destination

Use Segment's consent management with its OneTrust integration for Analytics.js, mapping each destination to the OneTrust category that governs it, so non-consenting visitors reach the warehouse but not ad tools. Check how unmapped destinations behave, fill the consent object on server-side events from stored records, and audit the mapping after every banner change, since changed category IDs break it.

Segment fans events out to every connected tool, so the consent decision has to travel with the event rather than live only in the banner. Segment offers consent management that maps consent categories to destinations, with a OneTrust integration for Analytics.js (check the current package and setup in Segment's docs). Mapped correctly, a visitor without targeting consent still reaches the warehouse but not Google Ads, Meta or Reddit.

The mapping is the actual work. Each Segment destination has to be assigned to the OneTrust group that governs it, and a destination added later by someone outside the privacy team falls under whatever Segment does for unmapped destinations, so check that setting before trusting it. Server-side sources need the consent object filled on each event from your stored record, because there is no banner on a server.

Specific break: Segment's mapping references OneTrust category IDs such as C0004. If the OneTrust template is reorganized and a category ID changes, the mapping silently points at nothing and destinations behave as if unmapped. Audit the mapping after every banner change, and keep the consent context on events in the warehouse so the effect of a change shows up as data.

OneTrust → Segment · what breaks

Why this join usually fails — OneTrust → Segment

  1. 01

    The userId and anonymousId never reaches OneTrust

    The identifier can only be captured after consent is given, so a visitor who consents on the second page has already lost the parameter from the first.

  2. 02

    A governance change that looks like broken tracking

    A privacy team tightens a banner on a Tuesday and a fifth of conversions disappear. The marketing team spends a week debugging tags that are working exactly as configured, because nobody connects the two systems.

  3. 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.

  4. 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.

OneTrust → Segment · the fix

What working looks like — OneTrust → Segment

  • The userId and anonymousId on every consent record

  • Conversions arriving in Segment

    Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.

  • Reconciled against the source

OneTrust → Segment · architecture

How OneTrust and Segment actually connect

  1. 1

    OneTrust holds the truth

    Consent is not a tracking detail, it is the gate. A conversion from a visitor who declined cannot lawfully be sent to an ad platform, and the share who decline is the ceiling on everything you report.

  2. 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. 3

    The identifier is the bridge

    The userId and anonymousId, captured at the visit and carried into the OneTrust consent record.

  4. 4

    The event source decides reliability

    Send only conversions where consent for advertising purposes was actually granted, and report the unconsented share as a stated number rather than a gap.

  5. 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.

OneTrust → Segment · normal or broken

Working vs. broken, side by side — OneTrust → Segment

Normal, not a fault

  • The userId and anonymousId present on the consent record

  • Sent from your order system, gated on the consent record

  • 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

    The identifier can only be captured after consent is given, so a visitor who consents on the second page has already lost the parameter from the first.

  • Sent from the browser

    A privacy team tightens a banner on a Tuesday and a fifth of conversions disappear. The marketing team spends a week debugging tags that are working exactly as configured, because nobody connects the two systems.

  • 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

OneTrust → Segment · diagnose

Diagnostic order — OneTrust → Segment

  1. 01

    Count consent records carrying the userId and anonymousId

  2. 02

    Follow one real conversion end to end

  3. 03

    Correlate conversion drops against the consent change log first

    Before touching a tag. In governed environments this explains the drop more often than any technical fault does.

  4. 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.

  5. 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.

OneTrust → Segment · prove

How it gets proven — OneTrust → Segment

Source of truth

Your order or CRM system, with the consent state at the time of the event recorded alongside.

  • The userId and anonymousId confirmed present on a live consent record.
  • An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
  • Consented conversions reconciled against imported figures, with the consent rate stated explicitly in the report.

OneTrust → Segment · free audit

What we check in the free audit

  • Count consent records carrying the userId and anonymousId
  • Follow one real conversion end to end
  • Correlate conversion drops against the consent change log first
  • Check identity resolution before checking anything downstream
  • Read the match rate, not the success message

Checked against

Your order or CRM system, with the consent state at the time of the event recorded alongside.

Get my free conversion tracking audit

Free30 minutesNo obligation

OneTrust → Segment · when not to buy

When you don't need this — OneTrust → Segment

  • Measure identifier coverage yourself first — pull your last hundred consent records and count how many carry the userId and anonymousId.
  • If your consent rate is very low, improving the banner experience will do more for your reporting than any tracking build — and that is a design and legal conversation, not a tagging one.
  • 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.

OneTrust → Segment · what we deliver

What gets built — OneTrust → Segment

  • Identifier capture into OneTrust

    Capture into a pending buffer on landing and only persist and dispatch once consent is recorded — never the reverse, and never 'capture now, ask later'.

  • Event source: your order system, gated on the consent record

    Send only conversions where consent for advertising purposes was actually granted, and report the unconsented share as a stated number rather than a gap.

  • 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

    Withdrawal of consent should stop future sends and, where the platform supports it, trigger a deletion request.

Written guarantee

95%+ tracking accuracy

Measured against Your order or CRM system, with the consent state at the time of the event recorded alongside.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

OneTrust → Segment questions, answered

Segment supports consent management with a OneTrust integration for Analytics.js; check Segment's docs for the current setup. You map OneTrust categories to destinations so each receives only consented events.

Free · 30 min

Get OneTrust and Segment joined properly

Free30 minutesNo obligation