Skip to main content
Friendbuy → MixpanelIntegration guide

Connecting Friendbuy to Mixpanel

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. Mixpanel is a product analytics tool, not an ad platform, which means it has no attribution model of its own and will faithfully report whatever event schema you give it — including a bad one. The join between them succeeds or fails on one thing: whether the distinct_id reaches the Friendbuy referral before the conversion happens, because Mixpanel can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Friendbuy to Mixpanel: keep the referral on the friend's profile

Record the Friendbuy referral arrival as a Mixpanel event and super property, and merge the anonymous distinct_id into the identified user at signup or checkout. Write an explicit acquisition-source property at first purchase using your precedence rule, since first-touch UTMs may show paid. Send orders from your backend with the order ID as $insert_id, avoiding duplicate referral-purchase events.

Mixpanel's job here is to show what referred customers do after their first order, which means the referral has to be attached to the friend's identity, not just to a session. The friend arrives on your store from a Friendbuy link with an anonymous distinct_id. Record the referral arrival as an event with a property for the referral and register it as a super property, then make sure that anonymous distinct_id is merged into the identified user at signup or checkout, or the referral sits on a profile nobody will ever see again.

Watch Mixpanel's own campaign properties. If the friend previously arrived from a paid ad, the profile may already carry first-touch UTM values from that visit, and a referral that converted them will look like a paid acquisition in any report built on those properties. Write an explicit acquisition-source property at first purchase using your precedence rule, and report on that instead.

Send orders from your backend with the order ID as $insert_id, and keep the advocate's share and reward events on the advocate's profile. Name events once: a purchase event from the store and a separate referral-purchase event from Friendbuy for the same order is the near-duplicate that splits every funnel.

Friendbuy → Mixpanel · what breaks

Why this join usually fails — Friendbuy → Mixpanel

  1. 01

    The distinct_id 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

    One event schema, two teams, no agreement

    Marketing names an event Purchase, the product team names it purchase_completed, and both are sent. Mixpanel treats them as unrelated, every funnel silently splits, and two teams spend a quarter arguing about which number is right when both are.

  4. 04

    Nothing reconciles afterwards

    Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.

Friendbuy → Mixpanel · the fix

What working looks like — Friendbuy → Mixpanel

  • The distinct_id on every referral

  • Conversions arriving in Mixpanel

    The event lands on the user profile and becomes available in funnels, retention and cohort analysis.

  • Reconciled against the source

Friendbuy → Mixpanel · architecture

How Friendbuy and Mixpanel 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

    Mixpanel needs a click to match

    Mixpanel needs a distinct_id, an event name and its properties. Events without a distinct_id are rejected; events with the wrong one land on a stranger's profile.

  3. 3

    The identifier is the bridge

    The distinct_id, 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

    Mixpanel deduplicates on $insert_id within a time window. Without it, a retried server request creates a second event, and because Mixpanel is where product decisions get made, that inflation ends up in a roadmap rather than in an ad report.

Friendbuy → Mixpanel · normal or broken

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

Normal, not a fault

  • The distinct_id present on the referral

  • Sent from your order feed with referral attribution

  • Deduplicated correctly

    Mixpanel deduplicates on $insert_id within a time window. Without it, a retried server request creates a second event, and because Mixpanel is where product decisions get made, that inflation ends up in a roadmap rather than in an ad report.

  • Reconciles with the source

Actually broken

  • The distinct_id 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

    Marketing names an event Purchase, the product team names it purchase_completed, and both are sent. Mixpanel treats them as unrelated, every funnel silently splits, and two teams spend a quarter arguing about which number is right when both are.

  • Nobody has reconciled it

Friendbuy → Mixpanel · diagnose

Diagnostic order — Friendbuy → Mixpanel

  1. 01

    Count referrals carrying the distinct_id

  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

    List every event name in the project and look for near-duplicates

    Case differences, tense differences and synonyms are the usual finding, and they are cheap to fix before a year of data is built on them.

  5. 05

    Read the match rate, not the success message

    Mixpanel shows events in the live view within moments. Check that the distinct_id matches the signed-in user rather than a lingering anonymous ID, because that is the failure that quietly breaks every cross-signup funnel.

Friendbuy → Mixpanel · prove

How it gets proven — Friendbuy → Mixpanel

Source of truth

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

  • The distinct_id confirmed present on a live referral.
  • Purchase events reconciled per transaction against your billing system, with identity aliasing verified across the signup boundary.
  • Non-referral orders reconciled against imported conversions, with referral volume and reward cost reported separately.

Friendbuy → Mixpanel · free audit

What we check in the free audit

  • Count referrals carrying the distinct_id
  • Follow one real conversion end to end
  • Check precedence between referral and paid parameters
  • List every event name in the project and look for near-duplicates
  • 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 → Mixpanel · when not to buy

When you don't need this — Friendbuy → Mixpanel

  • Measure identifier coverage yourself first — pull your last hundred referrals and count how many carry the distinct_id.
  • No referral programme means no conflict and this is an ordinary store integration.
  • If you already have the same events in a warehouse and nobody is running product analysis on them, adding Mixpanel adds a second source of truth rather than an answer.

Friendbuy → Mixpanel · what we deliver

What gets built — Friendbuy → Mixpanel

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

    The Mixpanel ingestion API, posted server-side from your backend with the distinct_id and event properties.

  • 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 → Mixpanel questions, answered

The profile kept first-touch UTM values from an earlier ad visit. Set your own acquisition-source property at first purchase using a deliberate precedence rule.

Free · 30 min

Get Friendbuy and Mixpanel joined properly

Free30 minutesNo obligation