Skip to main content
SamCart → BigQueryIntegration guide

Connecting SamCart to BigQuery

SamCart is a checkout platform built for conversion optimisation, which means order bumps and upsells are the point — and they complicate the value on every order. 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 SamCart order 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

SamCart to BigQuery: parent orders, upsells and refunds as rows

Load every SamCart order, charge and refund into BigQuery from webhooks or API, with customer email, product, order ID, any funnel reference and the stored click identifier. Group orders by customer to flag the acquisition order, track payment-plan charges in their own table with plan total and cash collected, and dedupe on SamCart's order or charge ID.

SamCart's order export answers how much you sold; BigQuery is where you answer how much each ad-acquired customer ended up being worth. Load every order, charge and refund from SamCart's webhooks or API with the customer email, product, order ID, any parent or funnel reference SamCart provides, and the field where you stored the click identifier. Check what your account actually exposes, because field names can differ between the webhook payload and the export.

Build the customer grain yourself. Group orders by customer email within a short window per funnel to tie a front-end order to its upsells, and flag the first as the acquisition. Front-end value, bump take rate, upsell take rate, refund rate and 90-day value per acquired customer then become views over one table, and you can see which campaigns bring customers who refund. The upsell inflation problem shows up plainly once you count acquisition orders instead of orders.

Payment plans and subscriptions need their own table of charges by date, because a program sold in six installments is one sixth of its price in cash this month and a contract the business may not fully collect. Store the plan total and cash collected separately. Deduplicate on SamCart's order or charge ID after each load, since webhook retries and backfills overlap.

SamCart → BigQuery · what breaks

Why this join usually fails — SamCart → BigQuery

  1. 01

    Whatever join key you decide on never reaches SamCart

    SamCart hosts the checkout, so the identifier has to be passed through its URL parameters or custom fields. The upsell flow adds a further step after the initial purchase, which can create additional orders that should not each count as a new acquisition.

  2. 02

    Upsells counted as separate acquisitions

    A funnel with two upsells can produce three orders from one customer. Counted as three conversions, the campaign looks three times better than it is.

  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.

SamCart → BigQuery · the fix

What working looks like — SamCart → BigQuery

  • Whatever join key you decide on on every order

  • 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

SamCart → BigQuery · architecture

How SamCart and BigQuery actually connect

  1. 1

    SamCart holds the truth

    The headline product price is rarely what the customer paid. Order bumps and one-click upsells are the platform's core feature, so the order total and the product price routinely differ substantially.

  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 SamCart order.

  4. 4

    The event source decides reliability

    Send the initial purchase as the acquisition conversion at the full realised value including bumps, and treat one-click upsells as additional revenue against the same customer rather than as new acquisitions.

  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.

SamCart → BigQuery · normal or broken

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

Normal, not a fault

  • Whatever join key you decide on present on the order

  • Sent from the SamCart order webhook

  • 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

    SamCart hosts the checkout, so the identifier has to be passed through its URL parameters or custom fields. The upsell flow adds a further step after the initial purchase, which can create additional orders that should not each count as a new acquisition.

  • Sent from the browser

    A funnel with two upsells can produce three orders from one customer. Counted as three conversions, the campaign looks three times better than it is.

  • 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

SamCart → BigQuery · diagnose

Diagnostic order — SamCart → BigQuery

  1. 01

    Count orders carrying whatever join key you decide on

  2. 02

    Follow one real conversion end to end

  3. 03

    Follow one purchase with upsells through to the conversions sent

    If three orders produced three acquisition conversions, you have found the inflation.

  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.

SamCart → BigQuery · prove

How it gets proven — SamCart → BigQuery

Source of truth

SamCart's order records for the same window, including bumps and upsells.

  • Whatever join key you decide on confirmed present on a live order.
  • Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
  • A purchase with two upsells confirmed to produce one acquisition conversion at the combined value.

SamCart → BigQuery · free audit

What we check in the free audit

  • Count orders carrying whatever join key you decide on
  • Follow one real conversion end to end
  • Follow one purchase with upsells through to the conversions sent
  • Reconcile warehouse order counts against each platform for one closed window
  • Read the match rate, not the success message

Checked against

SamCart's order records for the same window, including bumps and upsells.

Get my free conversion tracking audit

Free30 minutesNo obligation

SamCart → BigQuery · when not to buy

When you don't need this — SamCart → BigQuery

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry whatever join key you decide on.
  • If you run a single product with no bumps or upsells, the standard checkout approach applies and none of this complexity is relevant.
  • 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.

SamCart → BigQuery · what we deliver

What gets built — SamCart → BigQuery

  • Identifier capture into SamCart

    Pass the identifier into the SamCart checkout URL and confirm it lands on the order, then decide how upsell orders relate to the parent purchase before sending anything.

  • Event source: the SamCart order webhook

    Send the initial purchase as the acquisition conversion at the full realised value including bumps, and treat one-click upsells as additional revenue against the same customer rather than as new acquisitions.

  • 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 are recorded and, on aggressive upsell funnels, refund rates are high enough that ignoring them materially overstates performance.

Written guarantee

95%+ tracking accuracy

Measured against SamCart's order records for the same window, including bumps and upsells.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

SamCart → BigQuery questions, answered

Use any parent or funnel reference SamCart includes. If there is none, group by customer email and a short time window, and flag the first order as the acquisition.

Free · 30 min

Get SamCart and BigQuery joined properly

Free30 minutesNo obligation