Skip to main content
OneTrust → BigQueryIntegration guide

Connecting OneTrust to BigQuery

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. BigQuery has no attribution model, no deduplication rules and no opinion about your data — which makes it the only destination on this site where every number is exactly as good as the query that produced it. The join between them succeeds or fails on one thing: whether whatever join key you decide on reaches the OneTrust consent record before the conversion happens, because BigQuery can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

OneTrust consent state stored in BigQuery next to every order

Store on every BigQuery order or lead row the OneTrust consent state at the event: active groups, GPC presence, consent identifier and banner version. Add a consent-change table to explain overnight drops, using OneTrust's receipt exports if your plan offers them. Keep consent on the same row as click IDs and hashed emails, and filter every outbound export on it.

BigQuery is where consent becomes a number you can report instead of a gap. Store on every order or lead row the OneTrust consent state at the moment of the event: the active groups string, whether GPC was present, the OneTrust consent identifier if you capture it, and the banner version. Then the share of conversions that could lawfully be sent to each ad platform is a GROUP BY rather than an estimate argued over in a meeting.

A second table for consent changes, one row per change with timestamp, previous groups and new groups, is what explains overnight drops. Join it to daily conversions and a banner change that removed a fifth of targeting opt-ins shows up as a step on the same date. Check whether your OneTrust plan offers consent receipt exports or an API; if it does, that is the authoritative log and your rows are the operational copy.

What must not happen: BigQuery holding click IDs and hashed emails for visitors who opted out, and a later job uploading them to an ad platform because the column is populated. Keep the consent column on the same row as the identifiers and make every outbound export filter on it. That filter is the control your privacy team will ask to see.

OneTrust → BigQuery · what breaks

Why this join usually fails — OneTrust → BigQuery

  1. 01

    Whatever join key you decide on 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

    The warehouse quietly disagreeing with every platform

    This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.

  4. 04

    Nothing reconciles afterwards

    BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.

OneTrust → BigQuery · the fix

What working looks like — OneTrust → BigQuery

  • Whatever join key you decide on on every consent record

  • Conversions arriving in BigQuery

    The row lands in a table you own, joinable to every other table you own, with no window and no expiry.

  • Reconciled against the source

OneTrust → BigQuery · architecture

How OneTrust and BigQuery 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

    BigQuery needs a click to match

    BigQuery needs a schema and consistent types. The failure mode is not rejection, it is silent divergence: a column that arrives as a string in one load and an integer in the next, or a timestamp in the wrong zone, which produces answers that look plausible and are not.

  3. 3

    The identifier is the bridge

    Whatever join key you decide on, 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

    Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.

OneTrust → BigQuery · normal or broken

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

Normal, not a fault

  • Whatever join key you decide on present on the consent record

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

  • Deduplicated correctly

    Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.

  • Reconciles with the source

Actually broken

  • Whatever join key you decide on 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

    This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.

  • Nobody has reconciled it

OneTrust → BigQuery · diagnose

Diagnostic order — OneTrust → BigQuery

  1. 01

    Count consent records carrying whatever join key you decide on

  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

    Reconcile warehouse order counts against each platform for one closed window

    The gaps localize the problem: a gap against all platforms is a collection issue, a gap against one is that platform's window or matching.

  5. 05

    Read the match rate, not the success message

    BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.

OneTrust → BigQuery · prove

How it gets proven — OneTrust → BigQuery

Source of truth

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

  • Whatever join key you decide on confirmed present on a live consent record.
  • Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
  • Consented conversions reconciled against imported figures, with the consent rate stated explicitly in the report.

OneTrust → BigQuery · free audit

What we check in the free audit

  • Count consent records carrying whatever join key you decide on
  • Follow one real conversion end to end
  • Correlate conversion drops against the consent change log first
  • Reconcile warehouse order counts against each platform for one closed window
  • 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 → BigQuery · when not to buy

When you don't need this — OneTrust → BigQuery

  • Measure identifier coverage yourself first — pull your last hundred consent records and count how many carry whatever join key you decide on.
  • 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 have one store and one ad platform, a warehouse is infrastructure you will maintain for a reconciliation you could do in a spreadsheet.

OneTrust → BigQuery · what we deliver

What gets built — OneTrust → BigQuery

  • 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 BigQuery

    Streaming inserts or scheduled batch loads from your order system, with the raw event retained alongside whatever you derive from it.

  • 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 → BigQuery questions, answered

Write the active consent groups and GPC flag onto each event or order row when it happens, and keep a separate table of consent changes. Check whether OneTrust's consent receipts can be exported for reconciliation.

Free · 30 min

Get OneTrust and BigQuery joined properly

Free30 minutesNo obligation