Skip to main content
Saleor → AmplitudeIntegration guide

Connecting Saleor to Amplitude

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

Saleor to Amplitude: carry the storefront's device ID onto the order

Send Amplitude revenue events from Saleor's order webhook, after the storefront writes its Amplitude device ID and user ID into checkout metadata. Tag each event with the Saleor channel and creating client, send price and quantity per line net of discounts, and use the order ID as insert_id. Send refunds and cancellations as negative revenue events.

In a headless Saleor setup the Amplitude browser SDK runs in the storefront and knows the device ID and user ID; Saleor's API knows the order. Revenue events should come from the order webhook, which fires whether or not the shopper's tab is still open, so the storefront has to write its Amplitude device ID and user ID into checkout metadata for the server event to reuse. Skip that and every purchase lands on a new anonymous device with no browsing history.

Saleor's other clients create orders too: a mobile app, a point-of-sale client, a B2B portal, staff draft orders. Tag each revenue event with the Saleor channel and the client that created the order, so storefront funnels aren't padded by orders that never touched the storefront. Revenue goes in price and quantity per line, net of discounts. If channels use different currencies, check how your Amplitude project handles them before mixing them in one chart.

Use the Saleor order ID as insert_id, because webhook deliveries can retry. Refunds and cancellations go in as negative revenue events from their own webhooks, with their own insert_ids, so the revenue chart reflects what you kept rather than what was ordered.

Saleor → Amplitude · what breaks

Why this join usually fails — Saleor → Amplitude

  1. 01

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

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

  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.

Saleor → Amplitude · the fix

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

Saleor → Amplitude · architecture

How Saleor and Amplitude actually connect

  1. 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. 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 Saleor order.

  4. 4

    The event source decides reliability

    Send fully paid orders at their net total, sourced from the API.

  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.

Saleor → Amplitude · normal or broken

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

Normal, not a fault

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

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

    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

Saleor → Amplitude · diagnose

Diagnostic order — Saleor → Amplitude

  1. 01

    Count orders carrying the user ID and device ID pair

  2. 02

    Follow one real conversion end to end

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

  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.

Saleor → Amplitude · prove

How it gets proven — Saleor → Amplitude

Source of truth

Saleor orders by payment status, read from the API rather than inferred from the storefront.

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

Saleor → 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
  • Inspect order metadata on a live order for the identifier
  • Check a purchase event for the price and quantity fields specifically
  • 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.

Get my free conversion tracking audit

Free30 minutesNo obligation

Saleor → Amplitude · when not to buy

When you don't need this — Saleor → Amplitude

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the user ID and device ID pair.
  • If you run a single storefront and no other clients, the added complexity of headless attribution buys you nothing over a standard integration.
  • If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.

Saleor → Amplitude · what we deliver

What gets built — Saleor → Amplitude

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

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

Get my free conversion tracking audit

From $400 · See packages

FAQ

Saleor → Amplitude questions, answered

The server-side event doesn't carry the storefront's device or user ID. Write them into checkout metadata and send the order event with them.

Free · 30 min

Get Saleor and Amplitude joined properly

Free30 minutesNo obligation