Why WordPress PixelYourSite Silently Overrides CookieYes, Complianz & OneTrust (Hardcoded "granted" Bug)
If your WordPress site runs PixelYourSite alongside CookieYes, Complianz, or OneTrust, your cookie banner can look 100% compliant in the UI while still firing Meta Pixel (fbq), TikTok Pixel, and unrestricted GA4 pings on
If your WordPress site runs PixelYourSite alongside CookieYes, Complianz, or OneTrust, your cookie banner can look 100% compliant in the UI while still firing Meta Pixel (fbq), TikTok Pixel, and unrestricted GA4 pings on Cold Load, California Sec-GPC: 1, and even after clicking "Reject All" + Reload.
The Root Cause: Hardcoded "granted" Inside var pysOptions
When we audited 72 live US clinic & medspa websites and 53 live US Shopify stores (125 sites total, all anonymized) using automated 3-state headless Chromium .har captures:
- 66.7% (6 of 9) of sites actively paying for a CMP still leaked trackers on cold load.
- 77.8% (7 of 9) of clickable "Reject All" banners kept transmitting ad or analytics pings after a hard reload.
-
59.7% (43 of 72) of live US clinic/medspa sites ignored
Sec-GPC: 1.
On WordPress + WooCommerce sites, one of the most common culprits is PixelYourSite injecting an inline var pysOptions configuration object that hardcodes Google Consent Mode flags to "granted" before your CMP script loads or evaluates consent:
// Typical leak observed in rendered WordPress HTML source:
var pysOptions = {
"staticEvents": { /* ... */ },
"gdpr": {
"all_disabled_by_api": false,
"google_consent_mode": true,
"analytics_storage": "granted",
"ad_storage": "granted",
"ad_user_data": "granted",
"ad_personalization": "granted"
}
};
Even when CookieYes, Complianz, or OneTrust later sets a denied cookie or CMP state, PixelYourSite has already initialized fbq('init', ...) / gtag('consent', 'default', { ... 'granted' }) during initial HTML parseβor overwrites the CMP's consent signal on every page view.
How to Verify in 30 Seconds (DevTools or HAR)
- Open an Incognito window and load your WordPress site with Chrome DevTools Network open (check Preserve log).
- View Page Source (
Cmd+Option+U/Ctrl+U) and search forpysOptionsorad_storage. - Filter the Network tab for
facebook.com/tr,clarity.ms, orgoogle-analytics.com/g/collect. - Look at the GA4
gcsquery parameter on cold load and after clicking Reject All + reloading:-
gcs=G100indicates consent denied. -
gcs=G111indicates bothad_storageandanalytics_storagefired as granted.
-
The Fix: Enforce Default-Deny Before Any Plugin Script
- Disable PixelYourSite's forced consent defaults (or enable its explicit CMP integration for CookieYes / Complianz / OneTrust instead of auto-granting consent).
-
Place a strict Consent Mode v2 default-deny block at the very top of
<head>before GTM,pysOptions, or any pixel loader:
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'wait_for_update': 500
});
</script>
- Re-test Cold Load,
Sec-GPC: 1, and Reject All + Reload in a fresh browser context to verify zero pre-consentfacebook.com/trrequests andgcs=G100on GA4.
Open-Source Benchmark & Hosted Scanner
- Open-source Playwright HAR harness & anonymized dataset: pixel-cmp-ada-benchmark-2026 on GitHub
- Full WordPress PixelYourSite debugging guide: PixelYourSite & CMP Override Checklist
-
Zero-login 30-second live browser scanner (tests Cold Load,
Sec-GPC: 1, and Reject All + Reload; optional $39 one-time raw.har+ PDF report): TagProof Live Scanner
(Technical browser observation only; not legal advice.)
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.