Skip to main content
CartHook → AmplitudeIntegration guide

Connecting CartHook to Amplitude

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. Amplitude is built around behavioural cohorts, which makes the identity resolution and the event taxonomy load-bearing in a way they never are for an ad pixel. The join between them succeeds or fails on one thing: whether the user ID and device ID pair reaches the CartHook post-purchase order before the conversion happens, because Amplitude can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

CartHook upsells in Amplitude: a separate revenue event per offer

CartHook offers run where Amplitude's browser SDK usually isn't loaded, so write the device ID into a cart attribute before checkout. From the Shopify order webhook, send the original order and each accepted offer as separate revenue events with price, quantity and matching productId, using order ID plus line item as insert_id. Send upsell-only refunds as negative revenue.

In Amplitude, the question for CartHook isn't attribution. It's whether the upsell shows up as revenue against the right person. CartHook's offer pages run in Shopify's post-purchase flow, where your storefront's Amplitude browser SDK usually isn't loaded. That means the device ID from the shopping session has to be carried forward deliberately. A common way is to write it into a cart attribute before checkout so it lands on the Shopify order. Without that, the server-sent purchase arrives with only a customer ID, and if that buyer never identified in the browser, it can merge into a brand-new user.

Send the original order and each accepted offer as separate revenue events from the order webhook. Each one needs price and quantity set and a productId that matches what the storefront sends. You can mark upsells with revenueType so they can be filtered, but confirm the field against Amplitude's current HTTP API docs. If you send one event with the settled total instead, take rate and offer-level revenue can't be charted.

Use the Shopify order ID plus the line item as insert_id. Order webhooks retry, and an upsell line that's counted twice will inflate the offer's apparent take rate. If an upsell-only refund happens, send it as negative revenue on that product line. Don't void the whole order.

CartHook → Amplitude · what breaks

Why this join usually fails — CartHook → Amplitude

  1. 01

    The user ID and device ID pair 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

    Revenue events that carry no revenue

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  4. 04

    Nothing reconciles afterwards

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

CartHook → Amplitude · the fix

What working looks like — CartHook → Amplitude

  • The user ID and device ID pair on every order

  • Conversions arriving in Amplitude

    The event lands on the user, joins their behavioural history, and becomes available for cohorts, funnels and retention.

  • Reconciled against the source

CartHook → Amplitude · architecture

How CartHook and Amplitude 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

    Amplitude needs a click to match

    Amplitude needs a device or user identifier, an event type and its properties. Revenue events need the price and quantity fields specifically, or the revenue reporting stays empty while events flow normally.

  3. 3

    The identifier is the bridge

    The user ID and device ID pair, 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

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

CartHook → Amplitude · normal or broken

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

Normal, not a fault

  • The user ID and device ID pair present on the order

  • Sent from the Shopify order webhook

  • Deduplicated correctly

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

  • Reconciles with the source

Actually broken

  • The user ID and device ID pair 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

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  • Nobody has reconciled it

CartHook → Amplitude · diagnose

Diagnostic order — CartHook → Amplitude

  1. 01

    Count orders carrying the user ID and device ID pair

  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

    Check a purchase event for the price and quantity fields specifically

    Not whether the event arrived — whether the revenue fields are populated, in the exact names Amplitude expects.

  5. 05

    Read the match rate, not the success message

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

CartHook → Amplitude · prove

How it gets proven — CartHook → Amplitude

Source of truth

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

  • The user ID and device ID pair confirmed present on a live order.
  • Revenue reconciled per transaction against your billing system, with identity merge behaviour verified across signup.
  • Settled order totals reconciled against imported conversions for a closed week.

CartHook → Amplitude · free audit

What we check in the free audit

  • Count orders carrying the user ID and device ID pair
  • Follow one real conversion end to end
  • Compare checkout total against final settled total
  • Check a purchase event for the price and quantity fields specifically
  • 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 → Amplitude · when not to buy

When you don't need this — CartHook → Amplitude

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the user ID and device ID pair.
  • Stores without post-purchase offers can report checkout value and the timing question does not arise.
  • If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.

CartHook → Amplitude · what we deliver

What gets built — CartHook → Amplitude

  • 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 Amplitude

    The Amplitude HTTP V2 API, posted server-side with the identity, event type and 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 → Amplitude questions, answered

Send each accepted upsell as its own revenue event with price, quantity and productId, from the Shopify order webhook, using the same user or device ID as the storefront session.

Free · 30 min

Get CartHook and Amplitude joined properly

Free30 minutesNo obligation