Omea Consent · Guides

GA4 Measurement Protocol for WooCommerce purchases

Send WooCommerce purchases and sign-ups to GA4 from your server with the Measurement Protocol – tied to the visitor's session, only with consent.

Updated · Omea Consent 1.0.2

On this page
  1. Set it up
  2. What Omea sends
  3. Consent
  4. Why not send everything server-side?
  5. Check it

WooCommerce purchases tracked only in the browser go missing in GA4 when an ad blocker stops gtag.js or the visitor leaves the thank-you page too quickly. The GA4 Measurement Protocol lets your server send the purchase to GA4 directly.

Set it up

  1. Switch on GA4 Under Omea Consent › Integrations, switch on Google Analytics 4 with your Measurement ID (G-…).
  2. Create an API secret In GA4 go to Admin › Data streams › your web stream › Measurement Protocol API secrets › Create, and copy the secret value.
  3. Turn on the Measurement Protocol In the GA4 card, switch on Measurement Protocol, paste the API secret and click Save changes.
  4. Map the purchase Under Omea Consent › Conversions, make sure the purchase conversion exists and its GA4 row says purchase. Do the same for sign_up or other server-side events you want in GA4.

What Omea sends

  • Server-side conversions only – WooCommerce purchases, sign-ups and other server-side events. Conversions that happen in the browser keep going through the GA4 tag, so nothing is sent twice.
  • The event is tied to the visitor’s GA4 client ID and session, read from the _ga and _ga_<ID> cookies – so the purchase lands in the right session with the right traffic source.
  • The Consent Mode signals ad_user_data and ad_personalization follow the visitor’s Marketing consent.

We verified the payload against Google’s Measurement Protocol validation server – it returns no validation messages.

The Measurement Protocol needs Statistics consent, checked on your server. The visitor also needs a GA4 _ga cookie – which GA4 only sets with Statistics consent – so the event can be linked to their session. Without it, nothing is sent.

Why not send everything server-side?

GA4 needs browser context – page views, engagement, traffic sources – that only the tag collects. The Measurement Protocol adds the events most likely to be lost, purchases above all, and leaves the rest to the tag.

Check it

The GA4 card’s Latest server events list shows recent events as Sent or Error. In GA4, Realtime and DebugView show incoming events. Missing? See Conversions API events missing.