Skip to main content
SamCart → GA4Integration guide

Connecting SamCart to GA4

SamCart is a checkout platform built for conversion optimisation, which means order bumps and upsells are the point — and they complicate the value on every order. 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 SamCart order 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

SamCart to GA4: one purchase per buyer, not one per upsell

Decide whether GA4 sees one purchase with items for main product, bumps and upsells, sent by Measurement Protocol after the upsell flow ends with the client_id passed into the SamCart checkout URL, or keeps upsells as a custom event, not purchase. List bumps as their own items, and send refunds against the same transaction_id.

Each SamCart upsell can create its own order, and GA4 counts each purchase event with a distinct transaction_id as another purchase. Reports then show three purchases where one customer bought once. Decide up front whether GA4 should see upsells as separate purchases, which is right for revenue but wrong for buyer counts, or as one purchase with items for the main product, bumps and upsells.

The one-purchase option means waiting until the upsell flow ends, then sending a single Measurement Protocol purchase with the client_id that was passed into the SamCart checkout URL. If you keep upsells separate, send them under a custom event name rather than purchase. Reusing the parent order's transaction_id is not a shortcut, because GA4 may treat the repeat as a duplicate and drop the upsell revenue.

Bumps belong in items with their own item names, so GA4's item report shows bump take rate per product, which is often the most useful number a SamCart seller gets from GA4. Refunds go to GA4's refund event against the same transaction_id; on high-refund offers, GA4 revenue is otherwise overstated by the refund rate.

SamCart → GA4 · what breaks

Why this join usually fails — SamCart → GA4

  1. 01

    The GA4 client_id never reaches SamCart

    SamCart hosts the checkout, so the identifier has to be passed through its URL parameters or custom fields. The upsell flow adds a further step after the initial purchase, which can create additional orders that should not each count as a new acquisition.

  2. 02

    Upsells counted as separate acquisitions

    A funnel with two upsells can produce three orders from one customer. Counted as three conversions, the campaign looks three times better than it is.

  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.

SamCart → GA4 · the fix

What working looks like — SamCart → GA4

  • The GA4 client_id on every order

  • 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

SamCart → GA4 · architecture

How SamCart and GA4 actually connect

  1. 1

    SamCart holds the truth

    The headline product price is rarely what the customer paid. Order bumps and one-click upsells are the platform's core feature, so the order total and the product price routinely differ substantially.

  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 SamCart order.

  4. 4

    The event source decides reliability

    Send the initial purchase as the acquisition conversion at the full realised value including bumps, and treat one-click upsells as additional revenue against the same customer rather than as new acquisitions.

  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.

SamCart → GA4 · normal or broken

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

Normal, not a fault

  • The GA4 client_id present on the order

  • Sent from the SamCart order webhook

  • 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

    SamCart hosts the checkout, so the identifier has to be passed through its URL parameters or custom fields. The upsell flow adds a further step after the initial purchase, which can create additional orders that should not each count as a new acquisition.

  • Sent from the browser

    A funnel with two upsells can produce three orders from one customer. Counted as three conversions, the campaign looks three times better than it is.

  • 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

SamCart → GA4 · diagnose

Diagnostic order — SamCart → GA4

  1. 01

    Count orders carrying the GA4 client_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Follow one purchase with upsells through to the conversions sent

    If three orders produced three acquisition conversions, you have found the inflation.

  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.

SamCart → GA4 · prove

How it gets proven — SamCart → GA4

Source of truth

SamCart's order records for the same window, including bumps and upsells.

  • The GA4 client_id confirmed present on a live order.
  • Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
  • A purchase with two upsells confirmed to produce one acquisition conversion at the combined value.

SamCart → GA4 · free audit

What we check in the free audit

  • Count orders carrying the GA4 client_id
  • Follow one real conversion end to end
  • Follow one purchase with upsells through to the conversions sent
  • Check whether server events carry a session and a source
  • Read the match rate, not the success message

Checked against

SamCart's order records for the same window, including bumps and upsells.

Get my free conversion tracking audit

Free30 minutesNo obligation

SamCart → GA4 · when not to buy

When you don't need this — SamCart → GA4

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the GA4 client_id.
  • If you run a single product with no bumps or upsells, the standard checkout approach applies and none of this complexity is relevant.
  • 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.

SamCart → GA4 · what we deliver

What gets built — SamCart → GA4

  • Identifier capture into SamCart

    Pass the identifier into the SamCart checkout URL and confirm it lands on the order, then decide how upsell orders relate to the parent purchase before sending anything.

  • Event source: the SamCart order webhook

    Send the initial purchase as the acquisition conversion at the full realised value including bumps, and treat one-click upsells as additional revenue against the same customer rather than as new acquisitions.

  • 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 are recorded and, on aggressive upsell funnels, refund rates are high enough that ignoring them materially overstates performance.

Written guarantee

95%+ tracking accuracy

Measured against SamCart's order records for the same window, including bumps and upsells.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

SamCart → GA4 questions, answered

SamCart offers analytics settings; check what its native option sends on upsell pages. Server-sent purchases let you control how upsells are counted.

Free · 30 min

Get SamCart and GA4 joined properly

Free30 minutesNo obligation