Skip to main content
Friendbuy → GA4Integration guide

Connecting Friendbuy to GA4

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. GA4 is where the business goes to understand what happened, which makes an unattributed conversion there expensive in decisions rather than in ad spend. The join between them succeeds or fails on one thing: whether the GA4 client_id reaches the Friendbuy referral before the conversion happens, because GA4 can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Friendbuy to GA4: referral orders tagged, discounts visible

Add consistent UTM parameters such as referral to Friendbuy share links where possible, or GA4 files friends under direct. Add a referral flag parameter registered as a custom dimension to the purchase event, and record the reward in GA4's coupon and discount fields. Enrich the browser purchase tag rather than duplicating it, and compare GA4 paths with Friendbuy's report.

GA4 decides a session's source from the landing URL. A Friendbuy share link opened from a text message often arrives with no usable referrer, so GA4 files the referred friend under direct or unassigned unless the link carries UTM parameters. Check whether Friendbuy lets you set utm_source and utm_medium on share links, and use one consistent value such as referral so GA4 can group them.

On the purchase event, add a referral flag as an event parameter registered as a custom dimension, and send the referral reward in the coupon and discount fields GA4 already supports. GA4 does not hold costs, so recording the discount on the order is the only way to see the reward next to the revenue. Server-side Measurement Protocol needs the client_id stored at landing; if the browser purchase tag already reports orders reliably, enrich that event instead of sending a second one.

The precedence problem shows up in GA4 as well. A friend who clicked a paid ad last week and then opens a referral link today gets a new session with the referral source, and GA4's attribution model decides who gets the credit. Compare GA4's paths for referral orders with Friendbuy's own report before trusting either.

Friendbuy → GA4 · what breaks

Why this join usually fails — Friendbuy → GA4

  1. 01

    The GA4 client_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

    Everything lands under (direct)/(none)

    The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.

  4. 04

    Nothing reconciles afterwards

    GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.

Friendbuy → GA4 · the fix

What working looks like — Friendbuy → GA4

  • The GA4 client_id on every referral

  • Conversions arriving in GA4

    Conversions appear in GA4 attributed to the original session's source and medium, so acquisition reporting reflects what actually drove revenue.

  • Reconciled against the source

Friendbuy → GA4 · architecture

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

    GA4 needs a click to match

    GA4 needs the client_id to attach a server event to the user and session that produced the click. Without it there is no attribution to inherit and the event is orphaned.

  3. 3

    The identifier is the bridge

    The GA4 client_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

    GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.

Friendbuy → GA4 · normal or broken

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

Normal, not a fault

  • The GA4 client_id present on the referral

  • Sent from your order feed with referral attribution

  • Deduplicated correctly

    GA4 has no built-in deduplication for Measurement Protocol. If the browser also sends the event, it counts twice. The only reliable approach is to decide per event which side sends it, and enforce that decision — GA4 will not protect you from your own duplicates.

  • Reconciles with the source

Actually broken

  • The GA4 client_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

    The classic Measurement Protocol symptom, and it always means the same thing: the client_id was missing or wrong, so GA4 had no session to attach the event to and invented a new user.

  • Nobody has reconciled it

Friendbuy → GA4 · diagnose

Diagnostic order — Friendbuy → GA4

  1. 01

    Count referrals carrying the GA4 client_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

    Check whether server events carry a session and a source

    In GA4 Realtime or DebugView, find the event and look at its session and traffic source. A brand-new user with no source on every server event is the missing-client_id signature.

  5. 05

    Read the match rate, not the success message

    GA4 DebugView shows events arriving with their parameters, and Realtime confirms the user and session they attached to. Neither tells you whether you are double-counting — for that, compare GA4's conversion count against the source system's record for the same window.

Friendbuy → GA4 · prove

How it gets proven — Friendbuy → GA4

Source of truth

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

  • The GA4 client_id confirmed present on a live referral.
  • Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
  • Non-referral orders reconciled against imported conversions, with referral volume and reward cost reported separately.

Friendbuy → GA4 · free audit

What we check in the free audit

  • Count referrals carrying the GA4 client_id
  • Follow one real conversion end to end
  • Check precedence between referral and paid parameters
  • Check whether server events carry a session and a source
  • 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 → GA4 · when not to buy

When you don't need this — Friendbuy → GA4

  • Measure identifier coverage yourself first — pull your last hundred referrals and count how many carry the GA4 client_id.
  • No referral programme means no conflict and this is an ordinary store integration.
  • GA4 is reporting, not bidding. If your problem is ad platform optimization, fix the ad platform destination first — GA4 will not change what any campaign does.

Friendbuy → GA4 · what we deliver

What gets built — Friendbuy → GA4

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

    Measurement Protocol events with the client_id, session_id and the correct measurement ID and API secret, sent server-side.

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

Add a referral flag parameter to the purchase event, register it as a custom dimension, and tag share links with consistent UTM parameters if Friendbuy allows it.

Free · 30 min

Get Friendbuy and GA4 joined properly

Free30 minutesNo obligation