Skip to main content
ReferralCandy → SegmentIntegration guide

Connecting ReferralCandy to Segment

ReferralCandy serves smaller stores where the referral programme is often the second-largest acquisition channel and is almost never measured against paid media properly. 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 ReferralCandy 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

ReferralCandy into Segment: the code on Order Completed

Put the friend's ReferralCandy code in the coupon property of Segment's Order Completed, with a referred flag and the referrer's ID as properties. Use destination filters to drop referred orders from paid destinations when the referral wins, while warehouse and analytics still receive them. Call identify at checkout with the landing anonymousId, and never alias the referrer.

Segment's ecommerce spec already has a coupon property on Order Completed, which is the right home for the friend's ReferralCandy code. Add a referred flag and the referrer's ID as properties, and every downstream tool can tell referred orders apart without its own referral integration. The fan-out is the point and the risk: if Order Completed reaches ad destinations unfiltered, each one claims referred orders as paid conversions.

Use destination filters to drop referred orders from paid destinations when your precedence rule credits the referral, while still sending them to the warehouse and analytics tools; check what filtering your Segment plan includes. Capture the referral parameter and any paid click IDs on landing, as properties on the page call, so both are present by the time the order is placed.

Identity is the usual break. The friend lands anonymous, Segment assigns an anonymousId, and the order is placed with an email. Call identify at checkout with that same anonymousId in context so the referral landing stitches to the customer. The referrer is a different person: reference them by userId in a property, never through alias, or two customers merge into one.

ReferralCandy → Segment · what breaks

Why this join usually fails — ReferralCandy → Segment

  1. 01

    The userId and anonymousId never reaches ReferralCandy

    Referral links land with their own parameters on a store that may already hold a paid identifier.

  2. 02

    Referral and paid competing for the same orders

    Without a precedence rule the credit goes to whichever parameter was written last, which means your reported channel mix is an accident of browsing order.

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

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

ReferralCandy → Segment · the fix

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

ReferralCandy → Segment · architecture

How ReferralCandy and Segment actually connect

  1. 1

    ReferralCandy holds the truth

    At small-store scale the referral programme can rival paid acquisition in volume. Pooling them means neither channel's true cost per acquisition is knowable.

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

    The identifier is the bridge

    The userId and anonymousId, captured at the visit and carried into the ReferralCandy referral.

  4. 4

    The event source decides reliability

    Send orders net of rewards, with referral orders marked and excluded from paid conversion imports.

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

ReferralCandy → Segment · normal or broken

Working vs. broken, side by side — ReferralCandy → 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 land with their own parameters on a store that may already hold a paid identifier.

  • Sent from the browser

    Without a precedence rule the credit goes to whichever parameter was written last, which means your reported channel mix is an accident of browsing order.

  • 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

ReferralCandy → Segment · diagnose

Diagnostic order — ReferralCandy → Segment

  1. 01

    Count referrals carrying the userId and anonymousId

  2. 02

    Follow one real conversion end to end

  3. 03

    Count orders carrying both a referral and a paid parameter

    It is usually a meaningful share, and every one of them is currently credited by luck.

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

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

ReferralCandy → Segment · prove

How it gets proven — ReferralCandy → Segment

Source of truth

Store orders flagged by referral, net of both rewards.

  • 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 stated.

ReferralCandy → Segment · free audit

What we check in the free audit

  • Count referrals carrying the userId and anonymousId
  • Follow one real conversion end to end
  • Count orders carrying both a referral and a paid parameter
  • Check identity resolution before checking anything downstream
  • Read the match rate, not the success message

Checked against

Store orders flagged by referral, net of both rewards.

Get my free conversion tracking audit

Free30 minutesNo obligation

ReferralCandy → Segment · when not to buy

When you don't need this — ReferralCandy → Segment

  • Measure identifier coverage yourself first — pull your last hundred referrals and count how many carry the userId and anonymousId.
  • No referral programme, no conflict.
  • 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.

ReferralCandy → Segment · what we deliver

What gets built — ReferralCandy → Segment

  • Identifier capture into ReferralCandy

    Set precedence explicitly and record both identifiers on the order.

  • Event source: your order feed with referral attribution

    Send orders net of rewards, with referral orders marked and excluded from 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 reclaim rewards.

Written guarantee

95%+ tracking accuracy

Measured against Store orders flagged by referral, net of both rewards.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

ReferralCandy → Segment questions, answered

Put the referral code in the coupon property of Order Completed and add a referred flag, sourced from your store's order. Check whether ReferralCandy offers a Segment source of its own.

Free · 30 min

Get ReferralCandy and Segment joined properly

Free30 minutesNo obligation