Skip to main content
CartHook → MixpanelIntegration guide

Connecting CartHook to Mixpanel

CartHook does post-purchase one-click upsells specifically, which means every pound it adds arrives after the order was created and after any checkout-time conversion already fired. 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 CartHook post-purchase 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

CartHook in Mixpanel: tie upsell events to the shopper's distinct_id

CartHook pages run where Mixpanel's storefront snippet usually doesn't, so carry the distinct_id onto the order via a cart attribute and send events from the Shopify order webhook. Send the purchase at checkout value plus one upsell-accepted event per offer, using order ID plus line item as $insert_id. Keep revenue in one place to avoid double-counting.

Mixpanel is useful for CartHook because it can show which offer sequence converts for which cohort, but only if the upsell lands on the same person as the browse session. The post-purchase pages run inside Shopify's checkout flow, where your storefront's Mixpanel snippet usually doesn't run. So carry the distinct_id onto the order, typically via a cart attribute set before checkout, and send events server-side from the order webhook using that value.

Model it as two event types: the purchase at checkout value, then one upsell-accepted event per offer with the offer ID, product and amount. Declined offers matter too. Check whether CartHook exposes them in a way you can capture, because the decline rate per offer is what drives sequence changes. Use the Shopify order ID plus line item as $insert_id so webhook retries don't add phantom acceptances.

Keep revenue in one place. If you also send a purchase event with the settled total, any report summing revenue will count the upsell twice. Either the purchase carries the checkout total and upsells carry their own amounts, or the purchase carries the settled total and upsells are counted, not summed.

CartHook → Mixpanel · what breaks

Why this join usually fails — CartHook → Mixpanel

  1. 01

    The distinct_id never reaches CartHook

    The offer runs after order creation, so anything that fired at checkout has already gone.

  2. 02

    Upsell revenue that no campaign ever gets credit for

    If the conversion fires at checkout, every pound the upsell adds is invisible. The campaigns bringing buyers most receptive to upsells look identical to those bringing the least receptive.

  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.

CartHook → Mixpanel · the fix

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

CartHook → Mixpanel · architecture

How CartHook and Mixpanel actually connect

  1. 1

    CartHook holds the truth

    A one-click upsell charges the stored payment method and appends to the same order. The order total changes; the checkout total does not.

  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 CartHook post-purchase order.

  4. 4

    The event source decides reliability

    Send the settled order total, with upsell contribution recorded separately so take rate is visible per campaign.

  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.

CartHook → Mixpanel · normal or broken

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

Normal, not a fault

  • The distinct_id present on the order

  • Sent from the Shopify 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 offer runs after order creation, so anything that fired at checkout has already gone.

  • Sent from the browser

    If the conversion fires at checkout, every pound the upsell adds is invisible. The campaigns bringing buyers most receptive to upsells look identical to those bringing the least receptive.

  • 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

CartHook → Mixpanel · diagnose

Diagnostic order — CartHook → Mixpanel

  1. 01

    Count orders carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare checkout total against final settled total

    The gap is the revenue your conversion reporting is currently discarding.

  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.

CartHook → Mixpanel · prove

How it gets proven — CartHook → Mixpanel

Source of truth

The final Shopify order total after the post-purchase sequence completes.

  • 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.
  • Settled order totals reconciled against imported conversions for a closed week.

CartHook → Mixpanel · free audit

What we check in the free audit

  • Count orders carrying the distinct_id
  • Follow one real conversion end to end
  • Compare checkout total against final settled total
  • List every event name in the project and look for near-duplicates
  • Read the match rate, not the success message

Checked against

The final Shopify order total after the post-purchase sequence completes.

Get my free conversion tracking audit

Free30 minutesNo obligation

CartHook → Mixpanel · when not to buy

When you don't need this — CartHook → Mixpanel

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the distinct_id.
  • Stores without post-purchase offers can report checkout value and the timing question does not arise.
  • 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.

CartHook → Mixpanel · what we deliver

What gets built — CartHook → Mixpanel

  • Identifier capture into CartHook

    Send the conversion from the order webhook once the post-purchase window closes, rather than at checkout.

  • Event source: the Shopify order webhook

    Send the settled order total, with upsell contribution recorded separately so take rate is visible per campaign.

  • 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; an upsell-only refund should reduce rather than reverse the order.

Written guarantee

95%+ tracking accuracy

Measured against The final Shopify order total after the post-purchase sequence completes.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

CartHook → Mixpanel questions, answered

Send an upsell-accepted event per offer from the Shopify order webhook, on the same distinct_id as the storefront session, and build a funnel from purchase to upsell accepted.

Free · 30 min

Get CartHook and Mixpanel joined properly

Free30 minutesNo obligation