Skip to main content
Complianz → GA4Integration guide

Connecting Complianz to GA4

Complianz is a WordPress consent plugin that blocks scripts by category automatically, which means a plugin update can change what fires on your site without anyone deciding to. 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 Complianz consent record 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

Complianz and GA4: statistics consent, Consent Mode and MP events

Confirm how each Complianz region treats GA4 statistics, and that Consent Mode sets analytics_storage before the GA4 tag fires, even on cached pages. Server-side Measurement Protocol purchases need the _ga client_id, which exists only after statistics consent, so store the Complianz state on each order, never invent client_ids, and set ad_user_data from stored state.

Complianz places GA4 in its statistics category, and depending on the region settings in its wizard it may treat GA4 as anonymous statistics that fire before any choice. For US visitors under an opt-out model that is usually intended; for EU visitors it decides whether GA4 sees anyone who ignores the banner. Confirm which mode each region is in before reading any GA4 trend, because a wizard re-run or plugin update can change it.

If GA4 runs through Google Tag Manager, Complianz can set the Consent Mode v2 signals; check that analytics_storage is set before the GA4 configuration tag fires rather than after, or the first page view of each session goes uncookied. With full-page caching on, confirm the cached page still runs the consent check in the browser instead of serving a state baked in when the page was cached.

Server-side purchases through Measurement Protocol need the client_id from the _ga cookie, and that cookie only exists if the visitor allowed statistics. Orders from visitors who declined therefore arrive without one; do not invent a client_id for them, which manufactures users with no source. Store the Complianz state on the order when it is created, send consented orders with their client_id, and report the declined share as a stated gap. Measurement Protocol also takes a consent block for ad_user_data and ad_personalization; set it from the stored state instead of defaulting to granted.

Complianz → GA4 · what breaks

Why this join usually fails — Complianz → GA4

  1. 01

    The GA4 client_id never reaches Complianz

    Scripts are blocked before execution, and WordPress caching can serve a page with the wrong consent state entirely.

  2. 02

    Caching serving the wrong consent state

    A full-page cache does not know who is asking. A page cached for a consented visitor and served to one who declined runs scripts that should not have run, which is a compliance problem rather than a measurement one.

  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.

Complianz → GA4 · the fix

What working looks like — Complianz → GA4

  • The GA4 client_id on every consent record

  • 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

Complianz → GA4 · architecture

How Complianz and GA4 actually connect

  1. 1

    Complianz holds the truth

    Automatic script blocking on WordPress interacts with every other plugin. A caching plugin, a tag manager and a consent plugin all touching the same page produce ordering problems nobody planned.

  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 Complianz consent record.

  4. 4

    The event source decides reliability

    Send consented conversions with the consent rate stated.

  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.

Complianz → GA4 · normal or broken

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

Normal, not a fault

  • The GA4 client_id present on the consent record

  • Sent from your order system, gated on consent

  • 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

    Scripts are blocked before execution, and WordPress caching can serve a page with the wrong consent state entirely.

  • Sent from the browser

    A full-page cache does not know who is asking. A page cached for a consented visitor and served to one who declined runs scripts that should not have run, which is a compliance problem rather than a measurement one.

  • 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

Complianz → GA4 · diagnose

Diagnostic order — Complianz → GA4

  1. 01

    Count consent records carrying the GA4 client_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Test consent behaviour with caching enabled, not disabled

    Most consent testing is done with cache off, which is the one configuration that never runs in production.

  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.

Complianz → GA4 · prove

How it gets proven — Complianz → GA4

Source of truth

Your order or CRM system, with consent state recorded at the time of the event.

  • The GA4 client_id confirmed present on a live consent record.
  • Server events confirmed in DebugView attaching to an existing session with the original traffic source intact.
  • Consented conversions reconciled against imported figures, verified with production caching active.

Complianz → GA4 · free audit

What we check in the free audit

  • Count consent records carrying the GA4 client_id
  • Follow one real conversion end to end
  • Test consent behaviour with caching enabled, not disabled
  • Check whether server events carry a session and a source
  • Read the match rate, not the success message

Checked against

Your order or CRM system, with consent state recorded at the time of the event.

Get my free conversion tracking audit

Free30 minutesNo obligation

Complianz → GA4 · when not to buy

When you don't need this — Complianz → GA4

  • Measure identifier coverage yourself first — pull your last hundred consent records and count how many carry the GA4 client_id.
  • Sites without full-page caching avoid the interaction, though the category classification still matters.
  • 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.

Complianz → GA4 · what we deliver

What gets built — Complianz → GA4

  • Identifier capture into Complianz

    Verify which category your capture script sits in, and check that caching does not serve a consented page to a non-consented visitor.

  • Event source: your order system, gated on consent

    Send consented conversions with the consent rate stated.

  • 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

    Withdrawal stops future sends.

Written guarantee

95%+ tracking accuracy

Measured against Your order or CRM system, with consent state recorded at the time of the event.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Complianz → GA4 questions, answered

Check whether GA4 moved category, whether a region's consent model changed, or whether the update changed how Consent Mode defaults are set. Line the drop up against the plugin's changelog date.

Free · 30 min

Get Complianz and GA4 joined properly

Free30 minutesNo obligation