Skip to main content
CartHook → GA4Integration guide

Connecting CartHook to GA4

CartHook does post-purchase one-click upsells specifically, which means every pound it adds arrives after the order was created and after any checkout-time conversion already fired. 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 CartHook post-purchase 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

CartHook to GA4: settled revenue and upsell take rate by channel

CartHook appends offers after the Shopify order is created, so a checkout-time GA4 purchase misses them. Send purchase via Measurement Protocol from the order webhook after the offer sequence, with the _ga client_id and session_id stored in a cart attribute, upsell lines tagged in items, and the browser purchase removed. Refund upsells with item-level refund events.

CartHook appends its one-click offers to the Shopify order after it is created, so a GA4 purchase sent at checkout reports the pre-upsell total. In GA4 that matters less for bidding than for channel comparison: the Traffic acquisition report ranks sources on revenue that leaves out exactly the dollars CartHook adds.

Send purchase via Measurement Protocol from the Shopify order webhook after the offer sequence has finished, using the _ga client_id and session_id captured to a cart attribute on the storefront so the event lands on the original session's source. Put upsell and downsell lines in the items array with an item_category or item_list_name of your choosing; an Explorations report can then show take rate by session source. Remove the browser-side purchase at the same time, because GA4 will not reconcile two purchases for one order on your behalf.

For an upsell-only refund, send GA4's refund event with the transaction_id and only the refunded item and its value, rather than a full refund. A full refund would remove the original order from revenue when the customer kept it, and your refund rate on upsell items, the figure that tells you whether an offer is worth running, would be wrong in both directions.

CartHook → GA4 · what breaks

Why this join usually fails — CartHook → GA4

  1. 01

    The GA4 client_id never reaches CartHook

    The offer runs after order creation, so anything that fired at checkout has already gone.

  2. 02

    Upsell revenue that no campaign ever gets credit for

    If the conversion fires at checkout, every pound the upsell adds is invisible. The campaigns bringing buyers most receptive to upsells look identical to those bringing the least receptive.

  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.

CartHook → GA4 · the fix

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

CartHook → GA4 · architecture

How CartHook and GA4 actually connect

  1. 1

    CartHook holds the truth

    A one-click upsell charges the stored payment method and appends to the same order. The order total changes; the checkout total does not.

  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 CartHook post-purchase order.

  4. 4

    The event source decides reliability

    Send the settled order total, with upsell contribution recorded separately so take rate is visible per campaign.

  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.

CartHook → GA4 · normal or broken

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

Normal, not a fault

  • The GA4 client_id present on the order

  • Sent from the Shopify 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

    The offer runs after order creation, so anything that fired at checkout has already gone.

  • Sent from the browser

    If the conversion fires at checkout, every pound the upsell adds is invisible. The campaigns bringing buyers most receptive to upsells look identical to those bringing the least receptive.

  • 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

CartHook → GA4 · diagnose

Diagnostic order — CartHook → GA4

  1. 01

    Count orders carrying the GA4 client_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare checkout total against final settled total

    The gap is the revenue your conversion reporting is currently discarding.

  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.

CartHook → GA4 · prove

How it gets proven — CartHook → GA4

Source of truth

The final Shopify order total after the post-purchase sequence completes.

  • 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.
  • Settled order totals reconciled against imported conversions for a closed week.

CartHook → GA4 · free audit

What we check in the free audit

  • Count orders carrying the GA4 client_id
  • Follow one real conversion end to end
  • Compare checkout total against final settled total
  • Check whether server events carry a session and a source
  • Read the match rate, not the success message

Checked against

The final Shopify order total after the post-purchase sequence completes.

Get my free conversion tracking audit

Free30 minutesNo obligation

CartHook → GA4 · when not to buy

When you don't need this — CartHook → GA4

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the GA4 client_id.
  • Stores without post-purchase offers can report checkout value and the timing question does not arise.
  • 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.

CartHook → GA4 · what we deliver

What gets built — CartHook → GA4

  • Identifier capture into CartHook

    Send the conversion from the order webhook once the post-purchase window closes, rather than at checkout.

  • Event source: the Shopify order webhook

    Send the settled order total, with upsell contribution recorded separately so take rate is visible per campaign.

  • 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; an upsell-only refund should reduce rather than reverse the order.

Written guarantee

95%+ tracking accuracy

Measured against The final Shopify order total after the post-purchase sequence completes.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

CartHook → GA4 questions, answered

Send the purchase server-side after the post-purchase sequence ends, with upsell lines tagged in the items array and the original client_id. Then break item revenue down by session source in Explorations.

Free · 30 min

Get CartHook and GA4 joined properly

Free30 minutesNo obligation