WordPress Troubleshooting · Complianz & Google Site Kit
Complianz + Google Site Kit Firing GA4 Before Consent? Fix the Timing Race
A recurring WordPress headache: you installed Complianz GDPR/CCPA, enabled WP Consent API, and configured Google Site Kit — yet Chrome DevTools still shows google-analytics.com/g/collect firing on first load or after clicking Reject All.
Why Complianz + Site Kit Race in Production
- JS deferral / optimization plugins: WP Rocket, LiteSpeed Cache, Cloudflare Rocket Loader, and Perfmatters often delay or defer
complianz-gdprscripts, letting Site Kit's inlinegtag('config', 'G-...')execute first. - US opt-out vs opt-in defaults: For US visitors (including clinics subject to HIPAA or California CIPA scrutiny), Complianz's default US opt-out mode allows analytics on cold load unless tightened — and frequently ignores
Sec-GPC: 1. - Duplicate GA4 / GTM snippets: Many WordPress sites run Site Kit and a secondary GTM or PixelYourSite plugin that fires its own
g/collectbeacon outside Complianz's script center.
4-Step Fix Checklist
- Exclude
complianz-gdprandwp-consent-apifrom JS defer, delay, and minify rules in your caching plugin. - Verify in View Source that Complianz's Consent Mode default-denied snippet renders strictly above Site Kit's
gtag/jstag. - Disable redundant GA4 / Meta tags in Elementor Custom Code, HFCM, or PixelYourSite so only one consent-gated pipeline exists.
- Re-test your live URL across Cold Load, California
Sec-GPC: 1, and Reject All + Reload in an incognito browser.
Frequently Asked Questions
Why does the consent update arrive AFTER the first GA4 page_view?
Because Site Kit's inline gtag('config') runs synchronously while Complianz's consent state script is deferred or loaded later in the DOM. Moving the default-denied stub above Site Kit and excluding Complianz from JS delay fixes the race.
How do I verify my WordPress clinic or business site is clean?
Run a free 30-second 3-state browser scan at TagProof to inspect Cold Load, Sec-GPC: 1, Reject All + Reload, and WordPress plugin leaks with zero signup.
Test your WordPress Complianz setup in 30 seconds
Checks GA4, Meta Pixel, Clarity, Complianz load order, and WordPress PixelYourSite leaks automatically.
Run Free WordPress HAR Audit →