Connecting Refersion to Segment
Refersion runs affiliate and influencer programmes on Shopify stores, which puts a commission-earning third party directly alongside your paid media on the same orders. 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 Refersion conversion 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
Refersion to Segment: Affiliate Fields on Order Completed
Enrich the server-side Segment Order Completed event with Refersion's affiliate ID, attribution method and commission, using the coupon and affiliation properties, keyed on order ID. Delay the event until Refersion attributes, or follow it with a separate attribution event, never a second Order Completed. Check which field each destination reads as value.
Segment's ecommerce spec gives Order Completed properties for coupon and affiliation, which makes it the natural place to apply your affiliate-versus-paid precedence rule once and have every destination inherit it. Enrich the server-side Order Completed event with Refersion's affiliate ID, attribution method and commission, keyed on order ID. Check whether Segment's catalog lists a Refersion source; if not, read Refersion's API or webhook and merge the fields before the event is sent.
Timing is the catch. Refersion may decide attribution after the order exists, and conversions can sit pending. Either delay Order Completed until Refersion has attributed, or send the order immediately and follow with a separate affiliate attribution event. Do not send a second Order Completed from the Refersion side; with a different messageId it fans out as a duplicate order to every destination.
Downstream, Segment forwards Order Completed to ad destinations that know nothing about affiliates. If a platform should receive value net of commission, compute it in a property and check which field each destination's mapping actually reads as value. Capture Refersion's link parameter as a property on the landing page call so affiliate sessions are visible in the warehouse alongside paid ones.
Refersion → Segment · what breaks
Why this join usually fails — Refersion → Segment
- 01
The userId and anonymousId never reaches Refersion
Affiliate links carry their own parameters and land on your store, frequently overwriting or colliding with a paid identifier already stored.
- 02
Influencer codes claiming paid traffic's orders
A customer sees your ad, searches for a discount code, finds an influencer's, and orders. The influencer earns a commission on a sale your advertising produced, and your paid reporting counts it too.
- 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.
Refersion → Segment · the fix
What working looks like — Refersion → Segment
The userId and anonymousId on every conversion
Conversions arriving in Segment
Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.
Reconciled against the source
Refersion → Segment · architecture
How Refersion and Segment actually connect
- 1
Refersion holds the truth
An affiliate order costs you a commission on top of whatever the ad click cost. If both systems claim it, the order is being paid for twice and neither report mentions the other.
- 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 Refersion conversion.
- 4
The event source decides reliability
Send orders net of affiliate commission, with the affiliate-sourced share marked.
- 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.
Refersion → Segment · normal or broken
Working vs. broken, side by side — Refersion → Segment
Normal, not a fault
The userId and anonymousId present on the conversion
Sent from the store order record with Refersion attribution attached
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
Affiliate links carry their own parameters and land on your store, frequently overwriting or colliding with a paid identifier already stored.
Sent from the browser
A customer sees your ad, searches for a discount code, finds an influencer's, and orders. The influencer earns a commission on a sale your advertising produced, and your paid reporting counts it too.
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
Refersion → Segment · diagnose
Diagnostic order — Refersion → Segment
- 01
Count conversions carrying the userId and anonymousId
- 02
Follow one real conversion end to end
- 03
Count orders appearing in both paid conversions and Refersion
The overlap is the double payment. One query, rarely run.
- 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.
Refersion → Segment · prove
How it gets proven — Refersion → Segment
Source of truth
Store orders flagged by whether an affiliate link or code produced them, with the commission recorded.
- The userId and anonymousId confirmed present on a live conversion.
- An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
- Non-affiliate orders reconciled against imported conversions, with the overlap measured and stated.
Refersion → Segment · free audit
What we check in the free audit
- Count conversions carrying the userId and anonymousId
- Follow one real conversion end to end
- Count orders appearing in both paid conversions and Refersion
- Check identity resolution before checking anything downstream
- Read the match rate, not the success message
Checked against
Store orders flagged by whether an affiliate link or code produced them, with the commission recorded.
Free30 minutesNo obligation
Refersion → Segment · when not to buy
When you don't need this — Refersion → Segment
- Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the userId and anonymousId.
- No affiliate programme means no conflict and this reduces to an ordinary store 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.
Refersion → Segment · what we deliver
What gets built — Refersion → Segment
Identifier capture into Refersion
Set an explicit precedence rule between affiliate and paid parameters rather than letting last-write-wins decide, and record both on the order.
Event source: the store order record with Refersion attribution attached
Send orders net of affiliate commission, with the affiliate-sourced share marked.
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 reverse and should claw back the commission.
Written guarantee
95%+ tracking accuracy
Measured against Store orders flagged by whether an affiliate link or code produced them, with the commission recorded.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Refersion → Segment questions, answered
Check Segment's catalog for a Refersion source. Otherwise enrich your server-side Order Completed event with affiliate fields from Refersion's API or webhook, keyed on order ID.
Yes, every Order Completed fans out to connected destinations. Put the affiliate flag and net value on the event and use mappings or filters where a platform should be treated differently.
Almost always because the userId and anonymousId never reached the Refersion conversion. Affiliate links carry their own parameters and land on your store, frequently overwriting or colliding with a paid identifier already stored. 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 store order record with Refersion attribution attached. Send orders net of affiliate commission, with the affiliate-sourced share marked.
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 Refersion → Segment
- Stripe → SegmentConnecting Stripe to Segment
- PayPal → SegmentConnecting PayPal to Segment
- Shopify → SegmentConnecting Shopify to Segment
RELATED GUIDES
Where Refersion → Segment fits in the rest of your tracking
- Rewardful → SegmentConnecting Rewardful to Segment
- Everflow → SegmentConnecting Everflow to Segment
- ShareASale → SegmentConnecting ShareASale to Segment
- Refersion → BigQueryConnecting Refersion to BigQuery
- SaaSConversion tracking for SaaS, from signup through to the payment that matters
- FirstPromoter → SegmentConnecting FirstPromoter to Segment
- CJ → SegmentConnecting CJ Affiliate to Segment
- Rakuten Advertising → SegmentConnecting Rakuten Advertising to Segment
Free · 30 min
Get Refersion and Segment joined properly
Free30 minutesNo obligation
