Connecting Swell to Segment
Swell is headless commerce with subscriptions built in, which puts two conversion types in one system: a one-off order and a recurring plan that will bill again next month. 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 Swell 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
Swell to Segment: keep renewals out of Order Completed
Send Swell conversions to Segment with analytics.js on the storefront and server-side calls from Swell order webhooks. Identify with the Swell account ID as userId and store the anonymousId in order metadata. Send first orders as Order Completed but renewals as a separate event ad destinations ignore, using the Swell order ID for order_id and a deterministic messageId.
Headless commerce and Segment are a common pairing: analytics.js in your Swell storefront for browsing, server-side calls from Swell webhooks for orders. Check whether Swell offers a native Segment integration for your setup; if not, the build is straightforward because you own both ends. The identity rule is simple: identify with the Swell account ID as userId at checkout, including guest checkouts, and write the anonymousId into order metadata so server events stitch to the session.
The pair-specific trap is event naming. Many Segment destinations map Order Completed to a purchase conversion. If Swell subscription renewals are sent as Order Completed, every connected ad platform receives a new purchase each billing cycle for a customer acquired once. Send first orders as Order Completed and renewals as a separate event your ad destinations do not map, while the warehouse and email tool receive both.
Use the Swell order ID for order_id and as the basis of a deterministic messageId, since Swell webhooks can retry. Include the subscription ID and a first-or-renewal flag as properties, and carry the shopper's consent state from the storefront onto server-side events so Segment can drop ad destinations for anyone who declined.
Swell → Segment · what breaks
Why this join usually fails — Swell → Segment
- 01
The userId and anonymousId never reaches Swell
Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved.
- 02
Renewals indistinguishable from new orders
In a combined store the export gives you a list of payments. Without a first-versus-renewal flag, a customer on a monthly plan generates a conversion every month against the click that acquired them once.
- 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.
Swell → Segment · the fix
What working looks like — Swell → 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
Swell → Segment · architecture
How Swell and Segment actually connect
- 1
Swell holds the truth
A subscription's first payment and its renewals are the same object type in most exports. Sending both means one acquisition produces a conversion every billing cycle.
- 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 Swell order.
- 4
The event source decides reliability
Send one-off orders and first subscription payments. Renewals belong in a retention figure.
- 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.
Swell → Segment · normal or broken
Working vs. broken, side by side — Swell → Segment
Normal, not a fault
The userId and anonymousId present on the order
Sent from the Swell order and subscription webhooks
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
Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved.
Sent from the browser
In a combined store the export gives you a list of payments. Without a first-versus-renewal flag, a customer on a monthly plan generates a conversion every month against the click that acquired them once.
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
Swell → Segment · diagnose
Diagnostic order — Swell → Segment
- 01
Count orders carrying the userId and anonymousId
- 02
Follow one real conversion end to end
- 03
Compare monthly conversion count against new customer count
If conversions exceed new customers, renewals are being counted as acquisition.
- 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.
Swell → Segment · prove
How it gets proven — Swell → Segment
Source of truth
Swell orders and subscriptions by date, held apart from each other.
- 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.
- First payments reconciled against imported conversions, with renewals reported separately.
Swell → Segment · free audit
What we check in the free audit
- Count orders carrying the userId and anonymousId
- Follow one real conversion end to end
- Compare monthly conversion count against new customer count
- Check identity resolution before checking anything downstream
- Read the match rate, not the success message
Checked against
Swell orders and subscriptions by date, held apart from each other.
Free30 minutesNo obligation
Swell → Segment · when not to buy
When you don't need this — Swell → Segment
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the userId and anonymousId.
- A store selling only one-off products does not have the renewal problem.
- 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.
Swell → Segment · what we deliver
What gets built — Swell → Segment
Identifier capture into Swell
Write the identifier into customer metadata so the first payment can be attributed and renewals can be recognised as renewals.
Event source: the Swell order and subscription webhooks
Send one-off orders and first subscription payments. Renewals belong in a retention figure.
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 inside the first period reverse.
Written guarantee
95%+ tracking accuracy
Measured against Swell orders and subscriptions by date, held apart from each other.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Swell → Segment questions, answered
Renewals are probably being sent as Order Completed, which many destinations map to Purchase. Send renewals as a separate event.
The Swell account ID, set at checkout for guests as well as logged-in customers, with the anonymousId stored in order metadata.
Almost always because the userId and anonymousId never reached the Swell order. Headless storefront plus recurring billing means the renewal happens months later with no session and no storefront involved. 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 Swell order and subscription webhooks. Send one-off orders and first subscription payments. Renewals belong in a retention figure.
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 Swell → Segment
- Stripe → SegmentConnecting Stripe to Segment
- PayPal → SegmentConnecting PayPal to Segment
- Shopify → SegmentConnecting Shopify to Segment
RELATED GUIDES
Where Swell → Segment fits in the rest of your tracking
- Wix → SegmentConnecting Wix Stores to Segment
- Saleor → SegmentConnecting Saleor to Segment
- WooCommerce Subscriptions → SegmentConnecting WooCommerce Subscriptions to Segment
- Swell → BigQueryConnecting Swell to BigQuery
- BeautyConversion tracking for beauty brands, including the second order
- WooCommerce → SegmentConnecting WooCommerce to Segment
- Shopify POS → SegmentConnecting Shopify POS to Segment
- Checkout Extensibility → SegmentConnecting Shopify Checkout Extensibility to Segment
Free · 30 min
Get Swell and Segment joined properly
Free30 minutesNo obligation
