Connecting Saleor to Mixpanel
Saleor is headless and GraphQL-first, which means the storefront and the commerce engine are separate applications and the identifier has to survive a boundary that traditional platforms do not have. 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 Saleor 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
Saleor to Mixpanel: carry distinct_id across the headless gap
Have the storefront write its Mixpanel distinct_id, or the Saleor user ID used at identify, into checkout metadata, then send purchases only from the order webhook onto that person. Apply one guest-identity rule everywhere. Use the order ID as $insert_id for retries, and record channel and creating client to keep app and draft orders out of storefront funnels.
Mixpanel's distinct_id is created by the SDK in your storefront; the order is created in Saleor's API. To send purchases from the order webhook, where they're reliable, onto the right person, have the storefront write its distinct_id into checkout metadata during checkout and read it back from the order. If the storefront calls identify at login with a customer ID, usually the Saleor user ID, that is the value to carry.
Saleor allows guest checkout keyed on email. Guests stay anonymous in Mixpanel unless you identify them, so decide on one rule, identify guests by a derived ID or leave them anonymous, and apply it in the storefront and the server alike. Two different rules produce two people for one shopper, and the purchase funnel breaks at exactly the step you care about.
Send revenue from the webhook only. Mixpanel deduplicates on $insert_id together with event name, distinct_id and time, so a browser event and a later server event for the same order won't collapse into one. Use the order ID as $insert_id for webhook retries, and record the channel and the client that created the order as properties, so app and draft orders don't distort storefront funnels.
Saleor → Mixpanel · what breaks
Why this join usually fails — Saleor → Mixpanel
- 01
The distinct_id never reaches Saleor
The storefront holds the browser session; the commerce API holds the order. Nothing carries between them unless the storefront puts it there.
- 02
A storefront that knows the click and an API that holds the money
Headless architectures split exactly the two things attribution needs to join. If the storefront does not deliberately write the identifier into order metadata, the connection does not exist anywhere.
- 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.
Saleor → Mixpanel · the fix
What working looks like — Saleor → Mixpanel
The distinct_id on every order
Conversions arriving in Mixpanel
The event lands on the user profile and becomes available in funnels, retention and cohort analysis.
Reconciled against the source
Saleor → Mixpanel · architecture
How Saleor and Mixpanel actually connect
- 1
Saleor holds the truth
In a headless setup the storefront is one of several possible clients. Attributing from it means measuring one channel of a system designed to have many.
- 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 Saleor order.
- 4
The event source decides reliability
Send fully paid orders at their net total, sourced from the API.
- 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.
Saleor → Mixpanel · normal or broken
Working vs. broken, side by side — Saleor → Mixpanel
Normal, not a fault
The distinct_id present on the order
Sent from the Saleor order webhook
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
The storefront holds the browser session; the commerce API holds the order. Nothing carries between them unless the storefront puts it there.
Sent from the browser
Headless architectures split exactly the two things attribution needs to join. If the storefront does not deliberately write the identifier into order metadata, the connection does not exist anywhere.
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
Saleor → Mixpanel · diagnose
Diagnostic order — Saleor → Mixpanel
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Inspect order metadata on a live order for the identifier
Either it is on the order or the attribution is guesswork. There is no middle state.
- 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.
Saleor → Mixpanel · prove
How it gets proven — Saleor → Mixpanel
Source of truth
Saleor orders by payment status, read from the API rather than inferred from the storefront.
- The distinct_id confirmed present on a live order.
- Purchase events reconciled per transaction against your billing system, with identity aliasing verified across the signup boundary.
- Paid orders reconciled from the API against imported conversions.
Saleor → Mixpanel · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Inspect order metadata on a live order for the identifier
- List every event name in the project and look for near-duplicates
- Read the match rate, not the success message
Checked against
Saleor orders by payment status, read from the API rather than inferred from the storefront.
Free30 minutesNo obligation
Saleor → Mixpanel · when not to buy
When you don't need this — Saleor → Mixpanel
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
- If you run a single storefront and no other clients, the added complexity of headless attribution buys you nothing over a standard integration.
- 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.
Saleor → Mixpanel · what we deliver
What gets built — Saleor → Mixpanel
Identifier capture into Saleor
Capture in the storefront and write the identifier into order metadata through the API at checkout, so it lives on the order rather than in a session.
Event source: the Saleor order webhook
Send fully paid orders at their net total, sourced from the API.
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 and cancellations reverse.
Written guarantee
95%+ tracking accuracy
Measured against Saleor orders by payment status, read from the API rather than inferred from the storefront.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Saleor → Mixpanel questions, answered
Store the storefront's distinct_id in checkout metadata, then send the order event from the webhook with that distinct_id.
Count revenue from the webhook only, with the order ID as $insert_id. A browser purchase event alongside it will be counted separately.
Almost always because the distinct_id never reached the Saleor order. The storefront holds the browser session; the commerce API holds the order. Nothing carries between them unless the storefront puts it there. 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.
The Saleor order webhook. Send fully paid orders at their net total, sourced from the API.
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 Saleor → Mixpanel
- Stripe → MixpanelConnecting Stripe to Mixpanel
- PayPal → MixpanelConnecting PayPal to Mixpanel
- Shopify → MixpanelConnecting Shopify to Mixpanel
RELATED GUIDES
Where Saleor → Mixpanel fits in the rest of your tracking
- Braintree → MixpanelConnecting Braintree to Mixpanel
- SureCart → MixpanelConnecting SureCart to Mixpanel
- Shopify POS → MixpanelConnecting Shopify POS to Mixpanel
- Saleor → AmplitudeConnecting Saleor to Amplitude
- Saleor → Adobe AnalyticsConnecting Saleor to Adobe Analytics
- BeautyConversion tracking for beauty brands, including the second order
- Wix → MixpanelConnecting Wix Stores to Mixpanel
- Gumroad → MixpanelConnecting Gumroad to Mixpanel
Free · 30 min
Get Saleor and Mixpanel joined properly
Free30 minutesNo obligation
