Connecting Saleor to Segment
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. Segment is a customer data platform rather than an ad network, so sending to it is not about matching a conversion — it is about putting one clean event where every other destination can read it. The join between them succeeds or fails on one thing: whether the userId and anonymousId reaches the Saleor order before the conversion happens, because Segment can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Saleor to Segment: one Order Completed sent from the webhook
Check Saleor's Segment app first. Either way, the storefront writes Segment's anonymousId and any userId into checkout metadata, and the order webhook sends Order Completed server-side with order ID, products, revenue and currency. Send only from the server, with messageId derived from the order ID. Add channel, client and storefront consent context, and filter non-web orders from ad destinations.
Saleor has published a Segment app in its apps ecosystem that sends order events; check that it is maintained for your Saleor version and covers the events and fields you need before building your own. Either way, the shape is the same: the storefront runs Segment's browser library and writes its anonymousId, plus userId if the shopper is logged in, into checkout metadata, and the order webhook sends Order Completed server-side with that identity, the order ID, products, revenue and currency.
Don't send Order Completed from both the storefront and the server. Segment deduplicates on messageId, and two independent sends have two messageIds, so every order fans out twice to every destination. Pick the server, and derive the messageId from the order ID so webhook retries collapse into one.
Because Saleor serves several clients, put channel and client on each order event, and filter what reaches ad destinations; an order created in a mobile app or as a staff draft never saw a web ad. Consent captured by the storefront's banner must ride in the event context, because the server has no banner of its own to consult.
Saleor → Segment · what breaks
Why this join usually fails — Saleor → Segment
- 01
The userId and anonymousId 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.
- 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.
- 03
One bad event multiplied across every destination
Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.
- 04
Nothing reconciles afterwards
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
Saleor → Segment · the fix
What working looks like — Saleor → Segment
The userId and anonymousId on every order
Conversions arriving in Segment
Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.
Reconciled against the source
Saleor → Segment · architecture
How Saleor and Segment actually connect
- 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
Segment needs a click to match
Segment needs a consistent identity model — the same userId everywhere, an alias when an anonymous visitor becomes known, and event names that follow one spec. Feeding it inconsistent identities pushes the mess to every connected destination at once.
- 3
The identifier is the bridge
The userId and anonymousId, captured at the visit and carried into the Saleor order.
- 4
The event source decides reliability
Send fully paid orders at their net total, sourced from the API.
- 5
Deduplication at the destination
Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.
Saleor → Segment · normal or broken
Working vs. broken, side by side — Saleor → Segment
Normal, not a fault
The userId and anonymousId present on the order
Sent from the Saleor order webhook
Deduplicated correctly
Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.
Reconciles with the source
Actually broken
The userId and anonymousId 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
Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.
Nobody has reconciled it
Saleor → Segment · diagnose
Diagnostic order — Saleor → Segment
- 01
Count orders carrying the userId and anonymousId
- 02
Follow one real conversion end to end
- 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.
- 04
Check identity resolution before checking anything downstream
If anonymousId is never aliased to userId, every destination sees two people where there is one, and no downstream fix helps.
- 05
Read the match rate, not the success message
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
Saleor → Segment · prove
How it gets proven — Saleor → Segment
Source of truth
Saleor orders by payment status, read from the API rather than inferred from the storefront.
- The userId and anonymousId confirmed present on a live order.
- An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
- Paid orders reconciled from the API against imported conversions.
Saleor → Segment · free audit
What we check in the free audit
- Count orders carrying the userId and anonymousId
- Follow one real conversion end to end
- Inspect order metadata on a live order for the identifier
- Check identity resolution before checking anything downstream
- 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.
Free30 minutesNo obligation
Saleor → Segment · when not to buy
When you don't need this — Saleor → Segment
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the userId and anonymousId.
- If you run a single storefront and no other clients, the added complexity of headless attribution buys you nothing over a standard integration.
- If you send to one or two destinations, Segment is infrastructure you do not need — direct integrations are simpler and cheaper. It earns its place at genuine fan-out.
Saleor → Segment · what we deliver
What gets built — Saleor → Segment
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 Segment
Server-side track and identify calls with a stable messageId, consistent userId, and the click identifier carried as a trait or property.
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.
From $400 · See packages
FAQ
Saleor → Segment questions, answered
Saleor has published a Segment app; confirm it is maintained for your version and sends the order fields you need, or send Order Completed from your own webhook handler.
Write the browser library's anonymousId and userId into checkout metadata, then send the server-side order event with them.
Almost always because the userId and anonymousId never reached the Saleor order. The storefront holds the browser session; the commerce API holds the order. Nothing carries between them unless the storefront puts it there. Measure coverage before debugging the dispatch.
Segment identifies people by anonymousId before they are known and userId afterwards, and the alias between them is what stitches a session to a customer. Click identifiers travel as event properties or traits rather than as a matching key — Segment does not match anything itself, it forwards. That distinction changes the whole design: get the identity resolution right and every downstream destination inherits it.
The Saleor order webhook. Send fully paid orders at their net total, sourced from the API.
Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.
More on Saleor → Segment
- Stripe → SegmentConnecting Stripe to Segment
- PayPal → SegmentConnecting PayPal to Segment
- Shopify → SegmentConnecting Shopify to Segment
RELATED GUIDES
Where Saleor → Segment fits in the rest of your tracking
- WooCommerce Subscriptions → SegmentConnecting WooCommerce Subscriptions to Segment
- WooCommerce → SegmentConnecting WooCommerce to Segment
- Gumroad → SegmentConnecting Gumroad to Segment
- Saleor → BigQueryConnecting Saleor to BigQuery
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- PrestaShop → SegmentConnecting PrestaShop to Segment
- Ecwid → SegmentConnecting Ecwid to Segment
- Swell → SegmentConnecting Swell to Segment
Free · 30 min
Get Saleor and Segment joined properly
Free30 minutesNo obligation
