Google Consent Mode v2 Implementation Guide for EEA Traffic & GDPR Compliance
Prevent pre-consent tracker leaks and protect Google Ads remarketing in the EEA by configuring all four Consent Mode v2 signals before GTM or gtag.js fires.
Why pre-consent leaks fail GDPR & Google EU User Consent Policy
Loading Meta Pixel, Google Analytics 4, Hotjar, or LinkedIn Insight before a visitor clicks Accept drops non-essential identifiers (_ga, _fbp, _gcl_au) on the very first page load—violating ePrivacy/GDPR Article 5(3) consent rules.
Since March 2024, Google also enforces Consent Mode v2 for EEA ad measurement and audience lists. Without all four signals initialized to denied by default, conversion modeling and remarketing audiences degrade or stop working.
The 4 required Consent Mode v2 parameters (default denied)
Place the default consent command in <head> BEFORE loading gtag.js or Google Tag Manager, and include ad_storage, analytics_storage, ad_user_data, and ad_personalization set to "denied" plus wait_for_update.
Your CMP (CookieYes, Cookiebot, OneTrust, Didomi, Usercentrics, Axeptio, Iubenda, etc.) then calls gtag("consent", "update", ...) once the visitor grants or customizes consent.
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
wait_for_update: 500
});
</script>
<!-- Load GTM / gtag.js AFTER the default denied block -->Gate third-party scripts and harden Set-Cookie flags
For non-Google scripts (Meta Pixel, TikTok Pixel, Hotjar, Clarity), either trigger them exclusively through your CMP/GTM consent rules or mark script tags with type="text/plain" and your CMP category attribute (for example data-cookieconsent="marketing").
Finally, ensure first-party session cookies include Secure, HttpOnly, and SameSite=Lax (or Strict) so authentication tokens are never exposed to client scripts or insecure HTTP.
Check if your domain already passes these requirements
Run a 15-second live compliance scan across Privacy, EAA 2025, Email Auth, and Security Headers—or generate exact configs using our 6 free tools.