Connecting AfterSell to BigQuery
AfterSell works through checkout extensions and post-purchase pages, which puts its offers inside Shopify's sandboxed surfaces where your own scripts cannot reach. 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 AfterSell upsell 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
AfterSell orders in BigQuery: upsell take-rate by campaign
Land every Shopify order webhook payload in an append-only BigQuery table with line items, AfterSell's offer markers and click identifiers saved in cart attributes, then build a current-state view taking the latest version per order ID, because upsell edits resend orders. Query take-rate and added value by campaign, and model upsell refunds from the refunds array.
BigQuery is where AfterSell's effect can actually be measured: take-rate and added value by acquisition campaign, which no ad platform will tell you. That needs order rows, not just events. Land every Shopify order webhook payload, keep the line items with whatever marker AfterSell leaves on accepted offers, and store the click identifiers you captured into cart attributes at landing, such as gclid, fbclid, ttclid or rdt_cid.
The join key is the Shopify order ID, and the trap is versions. Shopify fires order updates for edits, fulfillments, tag changes and refunds, so the same order arrives many times, and an accepted post-purchase offer typically shows up as one of those edits. Keep raw payloads in an append-only table and build a current-state view that picks the latest version per order ID. Summing the raw table overstates revenue by every update.
With that view in place, the useful queries are short: share of orders with an accepted offer, average added value, and both by first-touch campaign. The same view is the reconciliation number for every ad platform you send to, since each should have received one final order total. Refunds on upsell lines come through the order's refunds array; model them separately or net upsell revenue will be wrong.
AfterSell → BigQuery · what breaks
Why this join usually fails — AfterSell → BigQuery
- 01
Whatever join key you decide on never reaches AfterSell
Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.
- 02
Trying to instrument a sandbox
Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.
- 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.
AfterSell → BigQuery · the fix
What working looks like — AfterSell → 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
AfterSell → BigQuery · architecture
How AfterSell and BigQuery actually connect
- 1
AfterSell holds the truth
Checkout UI extensions run sandboxed. Nothing you write can observe them, so the only reliable view of what the customer accepted is the order itself.
- 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 AfterSell upsell order.
- 4
The event source decides reliability
Send the final order total from the webhook, with upsell line items identified.
- 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.
AfterSell → BigQuery · normal or broken
Working vs. broken, side by side — AfterSell → BigQuery
Normal, not a fault
Whatever join key you decide on present on the order
Sent from the Shopify 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
Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.
Sent from the browser
Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.
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
AfterSell → BigQuery · diagnose
Diagnostic order — AfterSell → BigQuery
- 01
Count orders carrying whatever join key you decide on
- 02
Follow one real conversion end to end
- 03
Confirm the conversion is sourced from the order, not from a page
On modern Shopify checkout there is no supported page-based option left, so this is the only correct architecture.
- 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.
AfterSell → BigQuery · prove
How it gets proven — AfterSell → BigQuery
Source of truth
The final Shopify order total, read from the order record.
- 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.
- Final order totals reconciled from the webhook against imported conversions.
AfterSell → 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
- Confirm the conversion is sourced from the order, not from a page
- Reconcile warehouse order counts against each platform for one closed window
- Read the match rate, not the success message
Checked against
The final Shopify order total, read from the order record.
Free30 minutesNo obligation
AfterSell → BigQuery · when not to buy
When you don't need this — AfterSell → BigQuery
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry whatever join key you decide on.
- If your conversions already come from the order webhook, checkout extensions change nothing for you.
- 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.
AfterSell → BigQuery · what we deliver
What gets built — AfterSell → BigQuery
Identifier capture into AfterSell
Do not try to instrument the checkout surface. Read the order server-side, which is the supported and more reliable path anyway.
Event source: the Shopify order webhook
Send the final order total from the webhook, with upsell line items identified.
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.
Written guarantee
95%+ tracking accuracy
Measured against The final Shopify order total, read from the order record.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
AfterSell → BigQuery questions, answered
Load Shopify order webhooks, or a scheduled export, into BigQuery and identify accepted offers from the line items. Check whether AfterSell's own reporting offers an export, but the order record is the source of truth either way.
Usually because order update webhooks were summed instead of deduplicated. Keep the latest version per order ID before aggregating.
Almost always because whatever join key you decide on never reached the AfterSell upsell order. Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported. 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.
The Shopify order webhook. Send the final order total from the webhook, with upsell line items identified.
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 AfterSell → BigQuery
- Stripe → BigQueryConnecting Stripe to BigQuery
- PayPal → BigQueryConnecting PayPal to BigQuery
- Shopify → BigQueryConnecting Shopify to BigQuery
RELATED GUIDES
Where AfterSell → BigQuery fits in the rest of your tracking
- ReConvert → BigQueryConnecting ReConvert to BigQuery
- Checkout Champ → BigQueryConnecting Checkout Champ to BigQuery
- CartHook → BigQueryConnecting CartHook to BigQuery
- AfterSell → SnowflakeConnecting AfterSell to Snowflake
- AfterSell → SegmentConnecting AfterSell to Segment
- SupplementsConversion tracking for supplement brands, built around subscription value
- Zipify OCU → BigQueryConnecting Zipify OneClickUpsell to BigQuery
- Rebuy → BigQueryConnecting Rebuy to BigQuery
Free · 30 min
Get AfterSell and BigQuery joined properly
Free30 minutesNo obligation
