Skip to main content
SureCart → MixpanelIntegration guide

Connecting SureCart to Mixpanel

SureCart runs checkout off-site while the store lives in WordPress, which removes the database load and introduces a handoff where the identifier can be lost. 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 SureCart 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

SureCart to Mixpanel: the distinct_id has to ride the checkout

Pass the Mixpanel distinct_id into the SureCart checkout as metadata and send purchases from the order webhook with that distinct_id and order ID as $insert_id. Identify logged-in buyers with the WordPress user ID before checkout, choosing one canonical ID. Send renewals and cancellations as separate events, and check whether the webhook payload includes your metadata.

Mixpanel's JavaScript runs on your WordPress pages, and the order is created in SureCart's platform. To keep the purchase on the same profile as the browsing that led to it, read the distinct_id on the page and pass it into the SureCart checkout as metadata, then send the purchase server-side from the order webhook with that distinct_id and the order ID as $insert_id.

Identity is where WordPress stores trip up. If the buyer is logged in, call identify with the WordPress user ID before checkout so the order joins their account history. If they check out as a guest, the order stays on an anonymous profile, and a later login on another device starts a new person. Decide which ID is canonical, the WordPress user ID or the SureCart customer, and use it everywhere.

Send renewals and subscription cancellations as their own events, not as repeat purchases. Mixpanel retention reports for a membership or course site depend on telling a new buyer from a continuing one, and SureCart already distinguishes them. Check whether the SureCart order webhook payload includes your metadata, or whether you must fetch the checkout to read it.

SureCart → Mixpanel · what breaks

Why this join usually fails — SureCart → Mixpanel

  1. 01

    The distinct_id never reaches SureCart

    Checkout runs on SureCart's infrastructure, so the identifier must be passed at the handoff rather than read from the page.

  2. 02

    Order data living outside the site it belongs to

    Teams used to querying the WooCommerce orders table find nothing in the database, because the orders are not there. Reconciliation has to go through the API, and assuming otherwise wastes a day.

  3. 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.

  4. 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.

SureCart → Mixpanel · the fix

What working looks like — SureCart → 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

SureCart → Mixpanel · architecture

How SureCart and Mixpanel actually connect

  1. 1

    SureCart holds the truth

    Because the cart is hosted rather than in WordPress, the order data lives outside your database and must be pulled rather than queried.

  2. 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. 3

    The identifier is the bridge

    The distinct_id, captured at the visit and carried into the SureCart order.

  4. 4

    The event source decides reliability

    Send completed orders at paid value, with subscriptions sending only the first payment.

  5. 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.

SureCart → Mixpanel · normal or broken

Working vs. broken, side by side — SureCart → Mixpanel

Normal, not a fault

  • The distinct_id present on the order

  • Sent from the SureCart 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

    Checkout runs on SureCart's infrastructure, so the identifier must be passed at the handoff rather than read from the page.

  • Sent from the browser

    Teams used to querying the WooCommerce orders table find nothing in the database, because the orders are not there. Reconciliation has to go through the API, and assuming otherwise wastes a day.

  • 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

SureCart → Mixpanel · diagnose

Diagnostic order — SureCart → Mixpanel

  1. 01

    Count orders carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Confirm where the order record actually lives before designing reconciliation

    On hosted-checkout plugins it is not in WordPress, and that changes the whole approach.

  4. 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.

  5. 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.

SureCart → Mixpanel · prove

How it gets proven — SureCart → Mixpanel

Source of truth

SureCart orders by date, split into one-time and subscription purchases.

  • 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.
  • Completed orders reconciled from the API against imported conversions.

SureCart → Mixpanel · free audit

What we check in the free audit

  • Count orders carrying the distinct_id
  • Follow one real conversion end to end
  • Confirm where the order record actually lives before designing reconciliation
  • List every event name in the project and look for near-duplicates
  • Read the match rate, not the success message

Checked against

SureCart orders by date, split into one-time and subscription purchases.

Get my free conversion tracking audit

Free30 minutesNo obligation

SureCart → Mixpanel · when not to buy

When you don't need this — SureCart → Mixpanel

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
  • If you use a fully in-database cart, you can query directly and this indirection does not apply.
  • 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.

SureCart → Mixpanel · what we deliver

What gets built — SureCart → Mixpanel

  • Identifier capture into SureCart

    Capture on your WordPress site and pass the identifier into the checkout session as metadata.

  • Event source: the SureCart order webhook

    Send completed orders at paid value, with subscriptions sending only the first payment.

  • 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 SureCart orders by date, split into one-time and subscription purchases.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

SureCart → Mixpanel questions, answered

Pass the Mixpanel distinct_id into the SureCart checkout as metadata and send the purchase from the order webhook with that distinct_id and the order ID as $insert_id.

Free · 30 min

Get SureCart and Mixpanel joined properly

Free30 minutesNo obligation