Skip to main content
Friendbuy → BranchIntegration guide

Connecting Friendbuy to Branch

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. Branch's real job is the web-to-app seam — a person clicks a link in a browser, installs the app, and something has to carry the context across an install that destroys every cookie involved. The join between them succeeds or fails on one thing: whether the Branch link click identifier and the deferred deep link payload reaches the Friendbuy referral before the conversion happens, because Branch can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Friendbuy and Branch: keep the referral code through install

For app referrals, route Friendbuy share links through a Branch link carrying the referral code and advocate ID, read it from the deferred deep link on first open, and attach it to the new account. Add manual code entry as a fallback for empty iOS payloads. Send referred purchases server-side with net revenue and an order-ID-based event identifier.

If your referral program asks friends to install an app, the referral code has to survive the App Store, and that is what Branch is for. A Friendbuy share link that opens a web page loses the code the moment the friend installs, and the advocate is never rewarded for a friend who genuinely signed up through them. That produces complaints, not just bad data.

Carry the code through Branch. Generate or redirect share links so the friend passes through a Branch link whose link data includes the referral code and advocate identifier, then read it from the deferred deep link payload on first open and attach it to the new account. Check whether Friendbuy supports a link format or redirect that makes this possible, because the order of redirects matters and the referral parameters must not be dropped on the way.

On iOS the deferred payload can arrive empty, so give the app a manual code entry at sign-up as a fallback, and record which path credited the referral. Send the referred purchase to Branch from your server with the user identity you set in the Branch SDK, revenue net of the friend's discount, and an event identifier based on your order ID, so an SDK event and a server event for the same order are not both counted and forwarded to Branch's ad partners.

Friendbuy → Branch · what breaks

Why this join usually fails — Friendbuy → Branch

  1. 01

    The Branch link click identifier and the deferred deep link payload never reaches Friendbuy

    Referral links route through Friendbuy and land on your store with their own parameters, potentially overwriting a stored paid identifier.

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

  3. 03

    The install that erases the campaign

    Someone clicks a paid ad on the mobile web, hits the app store, installs, and opens the app as a brand new anonymous user. Without deferred deep linking that campaign produced an organic install, and the ad account shows nothing for a conversion it genuinely caused.

  4. 04

    Nothing reconciles afterwards

    Branch shows the attributed link and campaign on the event in its dashboard. Check that the install carries a link click rather than showing as organic, which is the failure this product exists to prevent.

Friendbuy → Branch · the fix

What working looks like — Friendbuy → Branch

  • The Branch link click identifier and the deferred deep link payload on every referral

  • Conversions arriving in Branch

    The event is attributed to the originating link and campaign, and forwarded to any configured downstream partners.

  • Reconciled against the source

Friendbuy → Branch · architecture

How Friendbuy and Branch actually connect

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

    Branch needs a click to match

    Branch needs the link click context matched to the app open, plus the event and its revenue. Without the deferred deep link payload there is nothing to join the install to.

  3. 3

    The identifier is the bridge

    The Branch link click identifier and the deferred deep link payload, captured at the visit and carried into the Friendbuy referral.

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

    Deduplication at the destination

    Branch deduplicates on the event identifier you supply. Firing a purchase from both the SDK and your server without a shared identifier double-counts, and Branch forwards to downstream partners, so the duplicate propagates.

Friendbuy → Branch · normal or broken

Working vs. broken, side by side — Friendbuy → Branch

Normal, not a fault

  • The Branch link click identifier and the deferred deep link payload present on the referral

  • Sent from your order feed with referral attribution

  • Deduplicated correctly

    Branch deduplicates on the event identifier you supply. Firing a purchase from both the SDK and your server without a shared identifier double-counts, and Branch forwards to downstream partners, so the duplicate propagates.

  • Reconciles with the source

Actually broken

  • The Branch link click identifier and the deferred deep link payload 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

    Someone clicks a paid ad on the mobile web, hits the app store, installs, and opens the app as a brand new anonymous user. Without deferred deep linking that campaign produced an organic install, and the ad account shows nothing for a conversion it genuinely caused.

  • Nobody has reconciled it

Friendbuy → Branch · diagnose

Diagnostic order — Friendbuy → Branch

  1. 01

    Count referrals carrying the Branch link click identifier and the deferred deep link payload

  2. 02

    Follow one real conversion end to end

  3. 03

    Check precedence between referral and paid parameters

    Whichever wins decides who gets credit, and almost nobody has decided it deliberately.

  4. 04

    Measure your organic install share and ask whether it is plausible

    An implausibly large organic share is usually broken attribution rather than genuine word of mouth.

  5. 05

    Read the match rate, not the success message

    Branch shows the attributed link and campaign on the event in its dashboard. Check that the install carries a link click rather than showing as organic, which is the failure this product exists to prevent.

Friendbuy → Branch · prove

How it gets proven — Friendbuy → Branch

Source of truth

Orders flagged by whether a referral produced them, with both reward costs recorded.

  • The Branch link click identifier and the deferred deep link payload confirmed present on a live referral.
  • Attributed installs and in-app purchases reconciled against your own user records, with the unattributed share stated.
  • Non-referral orders reconciled against imported conversions, with referral volume and reward cost reported separately.

Friendbuy → Branch · free audit

What we check in the free audit

  • Count referrals carrying the Branch link click identifier and the deferred deep link payload
  • Follow one real conversion end to end
  • Check precedence between referral and paid parameters
  • Measure your organic install share and ask whether it is plausible
  • Read the match rate, not the success message

Checked against

Orders flagged by whether a referral produced them, with both reward costs recorded.

Get my free conversion tracking audit

Free30 minutesNo obligation

Friendbuy → Branch · when not to buy

When you don't need this — Friendbuy → Branch

  • Measure identifier coverage yourself first — pull your last hundred referrals and count how many carry the Branch link click identifier and the deferred deep link payload.
  • No referral programme means no conflict and this is an ordinary store integration.
  • If you have no app, or no web surface driving app installs, there is no seam here to bridge and the integration solves nothing.

Friendbuy → Branch · what we deliver

What gets built — Friendbuy → Branch

  • 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 Branch

    The Branch server-to-server events API, posted from your backend with the user identity and event data.

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

Get my free conversion tracking audit

From $400 · See packages

FAQ

Friendbuy → Branch questions, answered

Send the friend through a Branch link carrying the code as link data, read it from the deferred deep link on first open, and offer manual code entry as a fallback.

Free · 30 min

Get Friendbuy and Branch joined properly

Free30 minutesNo obligation