Skip to main content
SureCart → GA4Integration guide

Connecting SureCart to GA4

SureCart runs checkout off-site while the store lives in WordPress, which removes the database load and introduces a handoff where the identifier can be lost. 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 SureCart 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

SureCart to GA4: put client_id into the checkout metadata

Read client_id and session_id from the _ga cookies, pass them into the SureCart checkout as metadata, and send purchase through the Measurement Protocol from the paid-order webhook with the order number as transaction_id. Send first payments only, renewals as a non-key custom event, and refunds by transaction_id. Turn off SureCart's built-in GA4 purchase to avoid doubles.

With SureCart the order is created on SureCart's side, so a server event to GA4 knows nothing about the shopper's browser unless you put it there. Read client_id and session_id from the _ga cookies on your WordPress page, add them to the checkout session as metadata, then read them back from the paid-order webhook and send purchase through Measurement Protocol.

Set transaction_id to the SureCart order number, value to the amount paid and currency as charged. For subscriptions, send purchase only for the first payment. Renewals are not new acquisitions, and sent without a live session they land under (direct)/(none) and blur every channel's revenue. If you want renewal revenue in GA4, send it as a separate custom event that is not a key event.

Check SureCart's settings for a built-in GA4 option. If it is on and fires purchase in the browser after checkout, adding Measurement Protocol doubles every order, because GA4 does not deduplicate the two. Refunds from the refund webhook go as GA4 refund events with the same transaction_id. Reconciliation runs against the SureCart API rather than the WordPress database, so pull paid orders by date from the API and compare them with GA4 purchases for the same window.

SureCart → GA4 · what breaks

Why this join usually fails — SureCart → GA4

  1. 01

    The GA4 client_id never reaches SureCart

    Checkout runs on SureCart's infrastructure, so the identifier must be passed at the handoff rather than read from the page.

  2. 02

    Order data living outside the site it belongs to

    Teams used to querying the WooCommerce orders table find nothing in the database, because the orders are not there. Reconciliation has to go through the API, and assuming otherwise wastes a day.

  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.

SureCart → GA4 · the fix

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

SureCart → GA4 · architecture

How SureCart and GA4 actually connect

  1. 1

    SureCart holds the truth

    Because the cart is hosted rather than in WordPress, the order data lives outside your database and must be pulled rather than queried.

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

  4. 4

    The event source decides reliability

    Send completed orders at paid value, with subscriptions sending only the first payment.

  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.

SureCart → GA4 · normal or broken

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

Normal, not a fault

  • The GA4 client_id present on the order

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

    Checkout runs on SureCart's infrastructure, so the identifier must be passed at the handoff rather than read from the page.

  • Sent from the browser

    Teams used to querying the WooCommerce orders table find nothing in the database, because the orders are not there. Reconciliation has to go through the API, and assuming otherwise wastes a day.

  • 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

SureCart → GA4 · diagnose

Diagnostic order — SureCart → GA4

  1. 01

    Count orders carrying the GA4 client_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Confirm where the order record actually lives before designing reconciliation

    On hosted-checkout plugins it is not in WordPress, and that changes the whole approach.

  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.

SureCart → GA4 · prove

How it gets proven — SureCart → GA4

Source of truth

SureCart orders by date, split into one-time and subscription purchases.

  • 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.
  • Completed orders reconciled from the API against imported conversions.

SureCart → GA4 · free audit

What we check in the free audit

  • Count orders carrying the GA4 client_id
  • Follow one real conversion end to end
  • Confirm where the order record actually lives before designing reconciliation
  • Check whether server events carry a session and a source
  • Read the match rate, not the success message

Checked against

SureCart orders by date, split into one-time and subscription purchases.

Get my free conversion tracking audit

Free30 minutesNo obligation

SureCart → GA4 · when not to buy

When you don't need this — SureCart → GA4

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the GA4 client_id.
  • If you use a fully in-database cart, you can query directly and this indirection does not apply.
  • 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.

SureCart → GA4 · what we deliver

What gets built — SureCart → GA4

  • Identifier capture into SureCart

    Capture on your WordPress site and pass the identifier into the checkout session as metadata.

  • Event source: the SureCart order webhook

    Send completed orders at paid value, with subscriptions sending only the first payment.

  • 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 and cancellations reverse.

Written guarantee

95%+ tracking accuracy

Measured against SureCart orders by date, split into one-time and subscription purchases.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

SureCart → GA4 questions, answered

Check SureCart's integration settings; built-in tracking is typically browser-side. For server-side, read client_id from checkout metadata on the order webhook and send through Measurement Protocol.

Free · 30 min

Get SureCart and GA4 joined properly

Free30 minutesNo obligation