Connecting LoyaltyLion to Mixpanel
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. Mixpanel is a product analytics tool, not an ad platform, which means it has no attribution model of its own and will faithfully report whatever event schema you give it — including a bad one. The join between them succeeds or fails on one thing: whether the distinct_id reaches the LoyaltyLion tier order before the conversion happens, because Mixpanel can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
LoyaltyLion in Mixpanel: put tier on the event, not the profile
Send orders, point earns, redemptions and tier changes to Mixpanel as events with the store customer ID as distinct_id. Put the LoyaltyLion tier and tier discount on each order event, since profile properties restate history in today's tier. Send revenue net of the tier discount, read from the order's discount lines, with the order ID as $insert_id.
Mixpanel is good at the loyalty questions product teams ask: who joins, who earns points but never redeems, what happens to purchase frequency after a tier upgrade. Send orders, point earns, redemptions and tier changes as events with the store customer ID as distinct_id, the same ID your storefront SDK identifies with at login, so the browsing and the loyalty activity sit on one person.
The Mixpanel-specific trap is profiles. A profile property holds the current tier, and a breakdown by it describes every past order by today's tier. A customer who reached the top tier yesterday makes all their entry-tier orders look like top-tier behavior. Put the tier, and the tier discount amount, on each order event as properties, and use the profile property only for segments about the present.
Revenue is net of the tier discount. LoyaltyLion's automatic perks don't arrive as a coupon code, so read the discount from the order's discount lines and confirm which line represents the tier. Use the order ID as $insert_id so a retried send doesn't count an order twice. Check whether LoyaltyLion offers a Mixpanel integration on your plan before writing your own.
LoyaltyLion → Mixpanel · what breaks
Why this join usually fails — LoyaltyLion → Mixpanel
- 01
The distinct_id 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
One event schema, two teams, no agreement
Marketing names an event Purchase, the product team names it purchase_completed, and both are sent. Mixpanel treats them as unrelated, every funnel silently splits, and two teams spend a quarter arguing about which number is right when both are.
- 04
Nothing reconciles afterwards
Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.
LoyaltyLion → Mixpanel · the fix
What working looks like — LoyaltyLion → Mixpanel
The distinct_id on every redemption
Conversions arriving in Mixpanel
The event lands on the user profile and becomes available in funnels, retention and cohort analysis.
Reconciled against the source
LoyaltyLion → Mixpanel · architecture
How LoyaltyLion and Mixpanel 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
Mixpanel needs a click to match
Mixpanel needs a distinct_id, an event name and its properties. Events without a distinct_id are rejected; events with the wrong one land on a stranger's profile.
- 3
The identifier is the bridge
The distinct_id, 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
Mixpanel deduplicates on $insert_id within a time window. Without it, a retried server request creates a second event, and because Mixpanel is where product decisions get made, that inflation ends up in a roadmap rather than in an ad report.
LoyaltyLion → Mixpanel · normal or broken
Working vs. broken, side by side — LoyaltyLion → Mixpanel
Normal, not a fault
The distinct_id present on the redemption
Sent from your order feed with tier attached
Deduplicated correctly
Mixpanel deduplicates on $insert_id within a time window. Without it, a retried server request creates a second event, and because Mixpanel is where product decisions get made, that inflation ends up in a roadmap rather than in an ad report.
Reconciles with the source
Actually broken
The distinct_id 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
Marketing names an event Purchase, the product team names it purchase_completed, and both are sent. Mixpanel treats them as unrelated, every funnel silently splits, and two teams spend a quarter arguing about which number is right when both are.
Nobody has reconciled it
LoyaltyLion → Mixpanel · diagnose
Diagnostic order — LoyaltyLion → Mixpanel
- 01
Count redemptions carrying the distinct_id
- 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
List every event name in the project and look for near-duplicates
Case differences, tense differences and synonyms are the usual finding, and they are cheap to fix before a year of data is built on them.
- 05
Read the match rate, not the success message
Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.
LoyaltyLion → Mixpanel · prove
How it gets proven — LoyaltyLion → Mixpanel
Source of truth
Store orders with the customer's loyalty tier recorded at the time of purchase.
- The distinct_id confirmed present on a live redemption.
- Purchase events reconciled per transaction against your billing system, with identity aliasing verified across the signup boundary.
- Orders reconciled net of tier discount against imported conversions, with tier recorded.
LoyaltyLion → Mixpanel · free audit
What we check in the free audit
- Count redemptions carrying the distinct_id
- Follow one real conversion end to end
- Compare average margin by loyalty tier
- List every event name in the project and look for near-duplicates
- 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 → Mixpanel · when not to buy
When you don't need this — LoyaltyLion → Mixpanel
- Measure identifier coverage yourself first — pull your last hundred redemptions and count how many carry the distinct_id.
- Flat-rate loyalty programmes without tiers do not have this problem.
- If you already have the same events in a warehouse and nobody is running product analysis on them, adding Mixpanel adds a second source of truth rather than an answer.
LoyaltyLion → Mixpanel · what we deliver
What gets built — LoyaltyLion → Mixpanel
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 Mixpanel
The Mixpanel ingestion API, posted server-side from your backend with the distinct_id and event properties.
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 → Mixpanel questions, answered
They are probably broken down by the profile tier, which is the current value. Store tier on each order event so past orders keep the tier held at the time.
Check whether LoyaltyLion offers a Mixpanel integration or webhooks on your plan; otherwise send events server-side with the store customer ID as distinct_id.
Almost always because the distinct_id 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.
Mixpanel identifies people by distinct_id, which starts as an anonymous device value and should be aliased to your own user ID at signup. Getting that alias wrong is the single most common Mixpanel implementation failure: the anonymous pre-signup activity and the identified user become two separate people, and every funnel that crosses signup is broken.
Your order feed with tier attached. Send orders net of tier discount, with the tier recorded so margin by cohort stays visible.
Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.
More on LoyaltyLion → Mixpanel
- Stripe → MixpanelConnecting Stripe to Mixpanel
- PayPal → MixpanelConnecting PayPal to Mixpanel
- Shopify → MixpanelConnecting Shopify to Mixpanel
RELATED GUIDES
Where LoyaltyLion → Mixpanel fits in the rest of your tracking
- Smile.io → MixpanelConnecting Smile.io to Mixpanel
- Punchh → MixpanelConnecting Punchh to Mixpanel
- Antavo → MixpanelConnecting Antavo to Mixpanel
- LoyaltyLion → MatomoConnecting LoyaltyLion to Matomo
- LoyaltyLion → Adobe AnalyticsConnecting LoyaltyLion to Adobe Analytics
- RestaurantsConversion tracking for restaurants, across reservations, orders and calls
- Talon.One → MixpanelConnecting Talon.One to Mixpanel
Free · 30 min
Get LoyaltyLion and Mixpanel joined properly
Free30 minutesNo obligation
