Connecting Friendbuy to Segment
Friendbuy runs customer-to-customer referral, which means the acquisition was produced by an existing customer and paid for with a reward on both sides. 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 Friendbuy referral 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
Friendbuy through Segment: one precedence rule for every destination
Decide referral versus paid once in Segment: send an Order Completed track call from your server with a precedence-based referral property, both identifiers and the order ID in messageId. Filter referral orders from ad destinations while the warehouse receives all. Alias the friend's anonymousId at checkout, send advocate rewards on their userId, and send refunds separately.
The argument for Segment here is that the referral-versus-paid decision gets made once, upstream, instead of separately inside every ad destination. Send an Order Completed track call from your server with a referral property set by your precedence rule, both stored identifiers as properties, and the order ID in the messageId. Then filter referral orders out of each ad destination's mapping, while the warehouse destination still receives all of them.
Check whether Friendbuy appears in Segment's catalog as a source or destination for your plan, and confirm in your account what it sends. A native connection that forwards referral events is useful for advocate behavior, but it does not replace the order event from your store, and two order-shaped events for one purchase is exactly the duplicate that fans out everywhere.
On identity, the friend landing from a referral link gets a new anonymousId, so alias it to your customer ID at checkout and set traits for referred_by and acquisition source. Send the advocate's reward as its own event on the advocate's userId. Refunds should go through as a separate refund event that downstream destinations can map to a reversal, and should trigger the reward clawback in Friendbuy.
Friendbuy → Segment · what breaks
Why this join usually fails — Friendbuy → Segment
- 01
The userId and anonymousId never reaches Friendbuy
Referral links route through Friendbuy and land on your store with their own parameters, potentially overwriting a stored paid identifier.
- 02
Word of mouth billed to the ad account
The better your referral programme performs, the worse your paid reporting gets — a genuinely perverse outcome caused entirely by last-write-wins identifier storage that nobody consciously chose.
- 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.
Friendbuy → Segment · the fix
What working looks like — Friendbuy → Segment
The userId and anonymousId on every referral
Conversions arriving in Segment
Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.
Reconciled against the source
Friendbuy → Segment · architecture
How Friendbuy and Segment actually connect
- 1
Friendbuy holds the truth
A double-sided referral costs you two discounts to acquire one customer. That is a real and known acquisition cost, and it sits nowhere near the ad account that will otherwise claim the sale.
- 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 Friendbuy referral.
- 4
The event source decides reliability
Send orders net of both referral rewards, with referral-sourced orders marked and held out of paid conversion imports.
- 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.
Friendbuy → Segment · normal or broken
Working vs. broken, side by side — Friendbuy → Segment
Normal, not a fault
The userId and anonymousId present on the referral
Sent from your order feed with referral attribution
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
Referral links route through Friendbuy and land on your store with their own parameters, potentially overwriting a stored paid identifier.
Sent from the browser
The better your referral programme performs, the worse your paid reporting gets — a genuinely perverse outcome caused entirely by last-write-wins identifier storage that nobody consciously chose.
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
Friendbuy → Segment · diagnose
Diagnostic order — Friendbuy → Segment
- 01
Count referrals carrying the userId and anonymousId
- 02
Follow one real conversion end to end
- 03
Check precedence between referral and paid parameters
Whichever wins decides who gets credit, and almost nobody has decided it deliberately.
- 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.
Friendbuy → Segment · prove
How it gets proven — Friendbuy → Segment
Source of truth
Orders flagged by whether a referral produced them, with both reward costs recorded.
- The userId and anonymousId confirmed present on a live referral.
- An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
- Non-referral orders reconciled against imported conversions, with referral volume and reward cost reported separately.
Friendbuy → Segment · free audit
What we check in the free audit
- Count referrals carrying the userId and anonymousId
- Follow one real conversion end to end
- Check precedence between referral and paid parameters
- Check identity resolution before checking anything downstream
- Read the match rate, not the success message
Checked against
Orders flagged by whether a referral produced them, with both reward costs recorded.
Free30 minutesNo obligation
Friendbuy → Segment · when not to buy
When you don't need this — Friendbuy → Segment
- Measure identifier coverage yourself first — pull your last hundred referrals and count how many carry the userId and anonymousId.
- No referral programme means no conflict and this is 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.
Friendbuy → Segment · what we deliver
What gets built — Friendbuy → Segment
Identifier capture into Friendbuy
Apply an explicit precedence rule between referral and paid parameters and record both on the order.
Event source: your order feed with referral attribution
Send orders net of both referral rewards, with referral-sourced orders marked and held out of paid conversion imports.
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 reclaim rewards.
Written guarantee
95%+ tracking accuracy
Measured against Orders flagged by whether a referral produced them, with both reward costs recorded.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Friendbuy → Segment questions, answered
Check Segment's catalog and Friendbuy's documentation for your plan. Even with a native connection, send the order itself from your store so there is one order event per purchase.
Set a referral property on Order Completed using your precedence rule and filter on it in each ad destination, while the warehouse still receives everything.
Almost always because the userId and anonymousId never reached the Friendbuy referral. Referral links route through Friendbuy and land on your store with their own parameters, potentially overwriting a stored paid identifier. 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.
Your order feed with referral attribution. Send orders net of both referral rewards, with referral-sourced orders marked and held out of paid conversion imports.
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 Friendbuy → Segment
- Stripe → SegmentConnecting Stripe to Segment
- PayPal → SegmentConnecting PayPal to Segment
- Shopify → SegmentConnecting Shopify to Segment
RELATED GUIDES
Where Friendbuy → Segment fits in the rest of your tracking
- Extole → SegmentConnecting Extole to Segment
- ReferralCandy → SegmentConnecting ReferralCandy to Segment
- Talkable → SegmentConnecting Talkable to Segment
- Friendbuy → BigQueryConnecting Friendbuy to BigQuery
- Subscription boxesConversion tracking for subscription boxes, measured in retained subscribers
- ReferralCandy → SnowflakeConnecting ReferralCandy to Snowflake
- Talkable → SnowflakeConnecting Talkable to Snowflake
- Extole → SnowflakeConnecting Extole to Snowflake
Free · 30 min
Get Friendbuy and Segment joined properly
Free30 minutesNo obligation
