Connecting Shopify to Mixpanel
Shopify is the system of record for the order, and its admin numbers are the ones the business runs on. 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 Shopify 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
Shopify in Mixpanel: one distinct_id from storefront to repeat order
Write the storefront's Mixpanel distinct_id to a Shopify cart attribute, read it from the order's note attributes in orders/paid, and send the purchase through the ingestion API under that ID with $insert_id set to the order ID. Identify with the Shopify customer ID, use one purchase event name, and send refunds separately for net revenue.
Mixpanel earns its place with Shopify on repeat purchase, not attribution: cohorts by first-order source, time to second order, which first products lead to subscriptions. All of that depends on one distinct_id per shopper. Write the storefront's Mixpanel distinct_id to a cart attribute, read it back from the order's note attributes in the orders/paid webhook, and send the purchase through the ingestion API under it.
Then merge identities once you know who the buyer is. Calling identify with the Shopify customer ID when a customer logs in ties browsing to the account, but Shopify's newer customer accounts are hosted on a Shopify domain rather than your storefront, so the identify call has to happen back on your storefront or server-side when the order arrives with its customer ID. Check which customer account version your store runs.
Name the event once. Shopify's customer events call it checkout_completed, your server sends Order Completed, and an app may send a third name; Mixpanel treats them as three unrelated events. Set $insert_id to the order ID so a retried webhook does not duplicate, and send refunds as their own event with the order ID so net revenue per cohort is possible.
Shopify → Mixpanel · what breaks
Why this join usually fails — Shopify → Mixpanel
- 01
The distinct_id never reaches Shopify
Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself.
- 02
Checkout extensibility hides what you need
Shopify deliberately restricts what runs during checkout. Setups that assumed free rein there broke when the platform moved to Checkout Extensibility, and many stores have been quietly under-reporting since.
- 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.
Shopify → Mixpanel · the fix
What working looks like — Shopify → 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
Shopify → Mixpanel · architecture
How Shopify and Mixpanel actually connect
- 1
Shopify holds the truth
The order carries line items, discounts, shipping, tax, currency and the customer. Note which figure you intend to report — total, subtotal, or net of shipping and tax — because most mismatches between Shopify and an ad platform turn out to be two people comparing two different numbers.
- 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 Shopify order.
- 4
The event source decides reliability
Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
- 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.
Shopify → Mixpanel · normal or broken
Working vs. broken, side by side — Shopify → Mixpanel
Normal, not a fault
The distinct_id present on the order
Sent from the orders/paid 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
Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself.
Sent from the browser
Shopify deliberately restricts what runs during checkout. Setups that assumed free rein there broke when the platform moved to Checkout Extensibility, and many stores have been quietly under-reporting since.
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
Shopify → Mixpanel · diagnose
Diagnostic order — Shopify → Mixpanel
- 01
Count orders carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Open a recent paid order and read its note attributes
If the identifier is not on the order, nothing downstream can attribute it. Check ten orders, not one — partial coverage is the normal failure, not total absence.
- 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.
Shopify → Mixpanel · prove
How it gets proven — Shopify → Mixpanel
Source of truth
Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.
- 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.
- Order totals in Shopify Admin reconciled per order, not on the summed total, over a closed window.
Shopify → Mixpanel · free audit
What we check in the free audit
- Count orders carrying the distinct_id
- Follow one real conversion end to end
- Open a recent paid order and read its note attributes
- List every event name in the project and look for near-duplicates
- Read the match rate, not the success message
Checked against
Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.
Free30 minutesNo obligation
Shopify → Mixpanel · when not to buy
When you don't need this — Shopify → Mixpanel
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
- Shopify's own native channel integrations already cover simple single-currency stores adequately. If your admin numbers and platform numbers already agree, you do not need this.
- 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.
Shopify → Mixpanel · what we deliver
What gets built — Shopify → Mixpanel
Identifier capture into Shopify
Capture the click identifier on the storefront, write it to a cart attribute so it becomes an order note attribute, and read it back server-side from the order. That path survives the checkout domain hop that breaks cookie-based approaches.
Event source: the orders/paid webhook
Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
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/create fires with the original order reference, so refunds and cancellations can be reversed at the destination.
Written guarantee
95%+ tracking accuracy
Measured against Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Shopify → Mixpanel questions, answered
Carry the storefront distinct_id into the order as a cart attribute, then send the purchase server-side under that ID and identify with the Shopify customer ID.
Different senders use different names. Pick one event name and stop the others, or the funnel splits.
Almost always because the distinct_id never reached the Shopify order. Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself. 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 orders/paid webhook. Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
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 Shopify → Mixpanel
- Shopify POS → MixpanelConnecting Shopify POS to Mixpanel
- Checkout Extensibility → MixpanelConnecting Shopify Checkout Extensibility to Mixpanel
- Shopify → HubSpotConnecting Shopify to HubSpot
RELATED GUIDES
Where Shopify → Mixpanel fits in the rest of your tracking
- Ecwid → MixpanelConnecting Ecwid to Mixpanel
- nopCommerce → MixpanelConnecting nopCommerce to Mixpanel
- Gumroad → MixpanelConnecting Gumroad to Mixpanel
- Shopify → GA4Connecting Shopify to GA4
- Shopify → AmplitudeConnecting Shopify to Amplitude
- Jewelry ecommerceConversion tracking for jewelry ecommerce, measured in settled orders
- WooCommerce Subscriptions → MixpanelConnecting WooCommerce Subscriptions to Mixpanel
- Shopify POS → MixpanelConnecting Shopify POS to Mixpanel
Free · 30 min
Get Shopify and Mixpanel joined properly
Free30 minutesNo obligation
