Connecting Cookiebot to BigQuery
Cookiebot scans your site and blocks scripts automatically by category, which means it can stop a tag you rely on without anybody deciding to. 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 Cookiebot consent state 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
Cookiebot consent in BigQuery: the column every query needs
In BigQuery, store Cookiebot consent as a column on each order: the categories, consent ID if recorded, and timestamp, read server-side from the CookieConsent cookie or a checkout value when the order is written. Keep withdrawals as new rows. Then query consent rate by traffic source and orders by consent state, the ceiling for any ad platform's credit.
BigQuery is where Cookiebot's effect becomes measurable, because it is the only place you can count conversions that happened without marketing consent next to the ones that did. Load orders with the consent state captured at the moment of the order: the Cookiebot categories, the consent ID if you record it, and a timestamp. Without that column, every query that later feeds an ad platform has to guess who may be included.
The join key is your order or user ID, with consent as an attribute of that row, not a separate table you hope lines up later. Cookiebot keeps its own consent log, but it is keyed to its own consent records, not to your orders; check what your plan lets you export from that log and which fields it holds before designing around it. The practical route is to read the consent state server-side when the order is written, from the CookieConsent cookie or a value your checkout passes, and store it with the order.
Once that column exists, two queries pay for the setup. Consent rate by traffic source shows where the banner costs you the most data. Order counts split by consent state show what share of real orders any ad platform could ever be credited with, which is the honest ceiling for every platform-versus-warehouse comparison. Keep withdrawals as new rows rather than overwriting the old state, so the history stays auditable.
Cookiebot → BigQuery · what breaks
Why this join usually fails — Cookiebot → BigQuery
- 01
Whatever join key you decide on never reaches Cookiebot
Scripts are blocked before execution, so an identifier-capture script placed in a blocked category never runs at all.
- 02
Automatic classification blocking the wrong script
The scanner decides what each script is. It gets things wrong, and a first-party capture script filed under marketing will be blocked for every visitor who declines marketing — including many who would have accepted what it actually does.
- 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.
- 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.
Cookiebot → BigQuery · the fix
What working looks like — Cookiebot → 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
Cookiebot → BigQuery · architecture
How Cookiebot and BigQuery actually connect
- 1
Cookiebot holds the truth
Automatic blocking classifies scripts by scanning. A misclassified tag gets blocked for visitors who would have consented, and the loss is invisible because everything looks configured correctly.
- 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
The identifier is the bridge
Whatever join key you decide on, captured at the visit and carried into the Cookiebot consent state.
- 4
The event source decides reliability
Send consented conversions, with the consent rate and the blocked-category mix reported alongside.
- 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.
Cookiebot → BigQuery · normal or broken
Working vs. broken, side by side — Cookiebot → BigQuery
Normal, not a fault
Whatever join key you decide on present on the consent record
Sent from your order system, gated on consent
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
Scripts are blocked before execution, so an identifier-capture script placed in a blocked category never runs at all.
Sent from the browser
The scanner decides what each script is. It gets things wrong, and a first-party capture script filed under marketing will be blocked for every visitor who declines marketing — including many who would have accepted what it actually does.
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
Cookiebot → BigQuery · diagnose
Diagnostic order — Cookiebot → BigQuery
- 01
Count consent records carrying whatever join key you decide on
- 02
Follow one real conversion end to end
- 03
Read the scan results and check how each of your scripts was classified
This takes ten minutes and it is the first thing to check when conversions drop after a CMP deployment.
- 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.
- 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.
Cookiebot → BigQuery · prove
How it gets proven — Cookiebot → BigQuery
Source of truth
Your order system, with the visitor's consent categories recorded at the time of the event.
- 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 script classifications verified against what they collect.
Cookiebot → 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
- Read the scan results and check how each of your scripts was classified
- Reconcile warehouse order counts against each platform for one closed window
- Read the match rate, not the success message
Checked against
Your order system, with the visitor's consent categories recorded at the time of the event.
Free30 minutesNo obligation
Cookiebot → BigQuery · when not to buy
When you don't need this — Cookiebot → BigQuery
- Measure identifier coverage yourself first — pull your last hundred consent records and count how many carry whatever join key you decide on.
- If you have no legal requirement for consent in your markets, adding automatic blocking will cost you data for no compliance benefit.
- 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.
Cookiebot → BigQuery · what we deliver
What gets built — Cookiebot → BigQuery
Identifier capture into Cookiebot
Verify which category your capture script is classified into, and keep capture in a category that matches what you actually collect.
Event source: your order system, gated on consent
Send consented conversions, with the consent rate and the blocked-category mix reported alongside.
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
Consent withdrawal stops future sends.
Written guarantee
95%+ tracking accuracy
Measured against Your order system, with the visitor's consent categories recorded at the time of the event.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Cookiebot → BigQuery questions, answered
Write the consent categories to each order or event row when it is created, from the consent cookie or a value your checkout passes server-side. Store withdrawals as new rows instead of updating old ones.
Check what your Cookiebot plan allows for consent log export and which fields it includes. Even then it is keyed to the consent record, so you still need consent on your own order rows to join it.
Almost always because whatever join key you decide on never reached the Cookiebot consent state. Scripts are blocked before execution, so an identifier-capture script placed in a blocked category never runs at all. Measure coverage before debugging the dispatch.
There is no vendor identifier here. You choose the key — order ID, user ID, click identifier, hashed email — and you live with the consequences. That is the whole appeal and the whole risk: nothing is standardised for you and nothing is silently wrong in a vendor's favour either.
Your order system, gated on consent. Send consented conversions, with the consent rate and the blocked-category mix reported alongside.
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.
More on Cookiebot → BigQuery
- Stripe → BigQueryConnecting Stripe to BigQuery
- PayPal → BigQueryConnecting PayPal to BigQuery
- Shopify → BigQueryConnecting Shopify to BigQuery
RELATED GUIDES
Where Cookiebot → BigQuery fits in the rest of your tracking
- iubenda → BigQueryConnecting iubenda to BigQuery
- Termly → BigQueryConnecting Termly to BigQuery
- OneTrust → BigQueryConnecting OneTrust to BigQuery
- Cookiebot → SnowflakeConnecting Cookiebot to Snowflake
- Cookiebot → SegmentConnecting Cookiebot to Segment
- Financial servicesConversion tracking for financial services, built for the compliance review
- Complianz → BigQueryConnecting Complianz to BigQuery
- Osano → BigQueryConnecting Osano to BigQuery
Free · 30 min
Get Cookiebot and BigQuery joined properly
Free30 minutesNo obligation
