Connecting LoyaltyLion to BigQuery
LoyaltyLion is built around tiers, which means a customer's discount rate changes as they spend more — and so does the margin on every subsequent 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 LoyaltyLion tier 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
LoyaltyLion in BigQuery: margin by tier, with tier history
Load store orders with customer ID, gross, tier discount and net into BigQuery, plus LoyaltyLion customers, tier changes and point transactions keyed on the same ID. You need tier history as dated rows, so start a daily snapshot if only the current tier is available. Join first-order click IDs to compare channels by tier outcome, and upload conversions at net.
BigQuery is where the LoyaltyLion margin problem becomes visible. Orders joined to the tier held at purchase, with the discount that tier applied, show how margin moves as your loyal base matures. The catch is history: the loyalty program tells you the tier a customer is in now. To know what tier they were in when they bought last March, you need tier changes stored as dated rows, or the tier written onto each order at the time.
Load orders from your store with customer ID, gross, tier discount and net. Load LoyaltyLion customers, tier changes and point transactions keyed on the same customer ID. Check whether your plan offers an API or export that includes tier history; if you can only read current tier, start a daily snapshot now so next year's analysis has dates to work with.
Then bring in the click identifiers stored on each customer's first order and compare acquisition channels by where their customers end up. Some paid sources produce customers who reach the top tier quickly and never pay full margin again, which is worth knowing before scaling them. Conversion uploads to ad platforms should come from this table at net value.
LoyaltyLion → BigQuery · what breaks
Why this join usually fails — LoyaltyLion → BigQuery
- 01
Whatever join key you decide on never reaches LoyaltyLion
Tier benefits apply automatically at checkout, so the discount is inside the order rather than in a code.
- 02
Tier discounts absorbed silently into order value
Unlike a coupon, a tier discount has no code. It is applied automatically and disappears into the order total, so the margin erosion from a maturing loyalty base is invisible in every marketing report.
- 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.
LoyaltyLion → BigQuery · the fix
What working looks like — LoyaltyLion → BigQuery
Whatever join key you decide on on every redemption
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
LoyaltyLion → BigQuery · architecture
How LoyaltyLion and BigQuery actually connect
- 1
LoyaltyLion holds the truth
A top-tier customer buys at a permanently lower margin. Their order value looks identical to a new customer's and is worth meaningfully less, which matters when you are deciding what a new customer is worth acquiring.
- 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 LoyaltyLion tier order.
- 4
The event source decides reliability
Send orders net of tier discount, with the tier recorded so margin by cohort stays visible.
- 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.
LoyaltyLion → BigQuery · normal or broken
Working vs. broken, side by side — LoyaltyLion → BigQuery
Normal, not a fault
Whatever join key you decide on present on the redemption
Sent from your order feed with tier 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
Tier benefits apply automatically at checkout, so the discount is inside the order rather than in a code.
Sent from the browser
Unlike a coupon, a tier discount has no code. It is applied automatically and disappears into the order total, so the margin erosion from a maturing loyalty base is invisible in every marketing report.
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
LoyaltyLion → BigQuery · diagnose
Diagnostic order — LoyaltyLion → BigQuery
- 01
Count redemptions carrying whatever join key you decide on
- 02
Follow one real conversion end to end
- 03
Compare average margin by loyalty tier
As the programme matures this gap widens, and it is the reason a growing loyal base can coincide with falling profitability.
- 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.
LoyaltyLion → BigQuery · prove
How it gets proven — LoyaltyLion → BigQuery
Source of truth
Store orders with the customer's loyalty tier recorded at the time of purchase.
- Whatever join key you decide on confirmed present on a live redemption.
- Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
- Orders reconciled net of tier discount against imported conversions, with tier recorded.
LoyaltyLion → BigQuery · free audit
What we check in the free audit
- Count redemptions carrying whatever join key you decide on
- Follow one real conversion end to end
- Compare average margin by loyalty tier
- Reconcile warehouse order counts against each platform for one closed window
- Read the match rate, not the success message
Checked against
Store orders with the customer's loyalty tier recorded at the time of purchase.
Free30 minutesNo obligation
LoyaltyLion → BigQuery · when not to buy
When you don't need this — LoyaltyLion → BigQuery
- Measure identifier coverage yourself first — pull your last hundred redemptions and count how many carry whatever join key you decide on.
- Flat-rate loyalty programmes without tiers do not have this problem.
- 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.
LoyaltyLion → BigQuery · what we deliver
What gets built — LoyaltyLion → BigQuery
Identifier capture into LoyaltyLion
Record the tier on the order and net tier discounts out of the reported value.
Event source: your order feed with tier attached
Send orders net of tier discount, with the tier recorded so margin by cohort stays visible.
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 Store orders with the customer's loyalty tier recorded at the time of purchase.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
LoyaltyLion → BigQuery questions, answered
Join orders to the tier held at purchase, from tier-change history or a tier stamped on the order, and subtract tier discounts from gross before comparing tiers.
Check your plan's API and exports. If you can only read the current tier, start a daily snapshot into BigQuery so future analysis has dated tiers.
Almost always because whatever join key you decide on never reached the LoyaltyLion tier order. Tier benefits apply automatically at checkout, so the discount is inside the order rather than in a code. 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 feed with tier attached. Send orders net of tier discount, with the tier recorded so margin by cohort stays visible.
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 LoyaltyLion → BigQuery
- Stripe → BigQueryConnecting Stripe to BigQuery
- PayPal → BigQueryConnecting PayPal to BigQuery
- Shopify → BigQueryConnecting Shopify to BigQuery
RELATED GUIDES
Where LoyaltyLion → BigQuery fits in the rest of your tracking
- Punchh → BigQueryConnecting Punchh to BigQuery
- Talon.One → BigQueryConnecting Talon.One to BigQuery
- Smile.io → BigQueryConnecting Smile.io to BigQuery
- LoyaltyLion → SnowflakeConnecting LoyaltyLion to Snowflake
- LoyaltyLion → SegmentConnecting LoyaltyLion to Segment
- RestaurantsConversion tracking for restaurants, across reservations, orders and calls
- Antavo → BigQueryConnecting Antavo to BigQuery
Free · 30 min
Get LoyaltyLion and BigQuery joined properly
Free30 minutesNo obligation
