Skip to main content
Optimizely → BigQueryIntegration guide

Connecting Optimizely to BigQuery

Optimizely deliberately shows different people different experiences, which means every conversion figure your ad platform reports is an average across variants it knows nothing about. 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 Optimizely variant assignment 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

Optimizely assignments joined to orders and ad clicks in BigQuery

In BigQuery, join an Optimizely assignments table (visitor ID, experiment, variation, first exposure) to orders carrying click IDs and campaign. Use the Enriched Events Export if your plan includes it, or log decisions yourself, and write Optimizely's visitor ID onto the order at checkout. Count from first exposure and check sample ratio per traffic source.

BigQuery is where Optimizely's blind spot gets fixed completely: an assignments table with visitor ID, experiment ID, variation ID and first-exposure time, joined to an orders table that carries click IDs and campaign. Check whether your Optimizely plan includes the Enriched Events Export, which delivers decision and conversion events as files you can load. If it does not, log decisions yourself from the client-side API to an endpoint you own.

The join key is the trap. Optimizely's visitor ID lives in its cookie and will not be on the order unless you put it there at checkout. Write it into the order record, or a session table keyed on your own ID, alongside gclid, fbclid or the GA4 client_id. Then for every campaign you can compute conversion rate per variant and see whether one campaign's audience responds to the test differently from the rest.

Count from first exposure and exclude orders placed before the visitor was bucketed. Then check sample ratio per traffic source: if paid social lands 55 to 45 in a 50/50 test, flicker or a redirect is losing visitors from one arm, and the warehouse is the only place that will show you. Optimizely's results page will not.

Optimizely → BigQuery · what breaks

Why this join usually fails — Optimizely → BigQuery

  1. 01

    Whatever join key you decide on never reaches Optimizely

    Client-side experiments can flicker and can delay rendering, which loses landing-page identifier capture on slow connections — a bias that falls unevenly across variants.

  2. 02

    An experiment silently confounding every campaign result

    A test that moves conversion rate by fifteen percent will move every campaign's measured performance by some fraction of that, and the media team will attribute it to bidding, creative or seasonality. Anything but the test.

  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.

Optimizely → BigQuery · the fix

What working looks like — Optimizely → BigQuery

  • Whatever join key you decide on on every assignment

  • 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

Optimizely → BigQuery · architecture

How Optimizely and BigQuery actually connect

  1. 1

    Optimizely holds the truth

    The variant is the missing dimension. Without it, a campaign's performance is confounded by an experiment nobody told the media team about, and both teams will draw confident, wrong conclusions.

  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 Optimizely variant assignment.

  4. 4

    The event source decides reliability

    Send purchases with the variant as a custom dimension, so campaign performance can be read per variant rather than blended.

  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.

Optimizely → BigQuery · normal or broken

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

Normal, not a fault

  • Whatever join key you decide on present on the assignment

  • Sent from your order system with variant attached

  • 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

    Client-side experiments can flicker and can delay rendering, which loses landing-page identifier capture on slow connections — a bias that falls unevenly across variants.

  • Sent from the browser

    A test that moves conversion rate by fifteen percent will move every campaign's measured performance by some fraction of that, and the media team will attribute it to bidding, creative or seasonality. Anything but the test.

  • 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

Optimizely → BigQuery · diagnose

Diagnostic order — Optimizely → BigQuery

  1. 01

    Count assignments carrying whatever join key you decide on

  2. 02

    Follow one real conversion end to end

  3. 03

    Check for running experiments before diagnosing a performance change

    First question, not last. It costs one minute and explains a surprising share of unexplained movements.

  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.

Optimizely → BigQuery · prove

How it gets proven — Optimizely → BigQuery

Source of truth

Your order system, joined to the variant each customer was assigned.

  • Whatever join key you decide on confirmed present on a live assignment.
  • Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
  • Orders reconciled per variant against imported conversions over the full experiment window.

Optimizely → BigQuery · free audit

What we check in the free audit

  • Count assignments carrying whatever join key you decide on
  • Follow one real conversion end to end
  • Check for running experiments before diagnosing a performance change
  • Reconcile warehouse order counts against each platform for one closed window
  • Read the match rate, not the success message

Checked against

Your order system, joined to the variant each customer was assigned.

Get my free conversion tracking audit

Free30 minutesNo obligation

Optimizely → BigQuery · when not to buy

When you don't need this — Optimizely → BigQuery

  • Measure identifier coverage yourself first — pull your last hundred assignments and count how many carry whatever join key you decide on.
  • If you are not running experiments on pages in the paid funnel, there is no confound and nothing to integrate.
  • 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.

Optimizely → BigQuery · what we deliver

What gets built — Optimizely → BigQuery

  • Identifier capture into Optimizely

    Capture the identifier before the experiment framework initializes, and pass the variant assignment as a dimension alongside it.

  • Event source: your order system with variant attached

    Send purchases with the variant as a custom dimension, so campaign performance can be read per variant rather than blended.

  • 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

    Refunds reverse and should retain the variant dimension.

Written guarantee

95%+ tracking accuracy

Measured against Your order system, joined to the variant each customer was assigned.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Optimizely → BigQuery questions, answered

Check whether your plan includes Optimizely's Enriched Events Export and load those files, or log decisions yourself to a table. Either way you need the visitor ID on the order to join.

Free · 30 min

Get Optimizely and BigQuery joined properly

Free30 minutesNo obligation