What Is Google Consent Mode V2? How to Implement It

Privacy regulations like the GDPR and CCPA have fundamentally shifted how businesses handle user data. Google Consent Mode V2 is a framework that adjusts Google tags’ behavior based on user consent choices, enabling businesses to gather essential insights without infringing on privacy.

This article covers what Consent Mode V2 is, how it works, the difference between Basic and Advanced implementation, and practical steps for implementation.

TL;DR

  • Consent Mode V2 has been mandatory since March 2024 for any website serving EEA or UK users while running Google Ads or GA4.
  • V2 introduces two new parametersad_user_data and ad_personalization-alongside the existing ad_storage and analytics_storage.
  • Two implementation modes exist: Basic (tags don’t load until consent is given) and Advanced (tags load immediately and send anonymized signals for conversion modeling).
  • Data modeling in Advanced mode can recover up to 70% of lost ad-click-to-conversion processes through AI modeling.
  • Implementation requires a Consent Management Platform (CMP), default consent states set before tags fire, and consent updates triggered by user interactions.

Google Consent Mode is a framework that adjusts how Google tags behave based on user consent choices. It enables businesses to configure Google tags to respect users’ choices while still gathering valuable analytics and ad performance data.

When a user denies consent for tracking, Consent Mode ensures that tags operate in a restricted mode. Personal data is not collected, but Google can still aggregate anonymized information to provide some level of insight.

Consent states:

  • Granted: The user has given permission for tracking; all tags function normally.
  • Denied: The user has opted out; tags operate in restricted mode, collecting no personal data.

Note: Consent Mode communicates user consent to Google but does not save consent choices itself. You must persist consent choices using your own mechanism (first-party cookie, localStorage, or your CMP).

Consent Mode V2 was announced in November 2023 with enforcement beginning March 2024. The key changes are:

FeatureConsent Mode V1Consent Mode V2
Parametersad_storage, analytics_storageAdds ad_user_data, ad_personalization
Data modelingLimitedEnhanced AI-powered modeling
MandatoryOptionalRequired for EEA/UK advertisers
Implementation typesSingle modeBasic and Advanced

Consent Mode V2 uses four key parameters that control how Google tags behave:

ParameterPurposeValues
ad_storageControls advertising cookie storagegranted / denied
analytics_storageControls analytics cookie storagegranted / denied
ad_user_dataControls sending user data to Google for advertising purposesgranted / denied
ad_personalizationControls personalized advertising (e.g., remarketing)granted / denied

Interaction with Google Analytics and Google Ads

When Consent Mode is implemented:

  • If consent is granted: Tags run normally, collecting full data.
  • If consent is denied: Tags switch to restricted mode. No personal data is collected, but anonymized data (such as traffic sources or page views) may still be gathered.

For Google Ads, conversion tracking and retargeting work normally for consenting users. For non-consenting users, data modeling provides estimates on conversion actions.

Google reports that Consent Mode V2 can recover up to 70% of lost ad-click-to-conversion processes through AI modeling.

Consent Mode V2 offers two implementation types:

In Basic mode, Google tags do not load until a user interacts with the consent banner. No data is sent to Google before consent is given.

Best for: GDPR compliance as the priority, with a simple setup.

Trade-off: No data is collected from users who never interact with the banner.

In Advanced mode, Google tags load immediately and send anonymized pings without cookies if the user refuses consent. This allows Google to estimate missing conversions through conversion modeling.

Best for: Advertisers who want to strengthen conversion tracking and obtain more accurate analytics.

Trade-off: Requires legal validation; data is transmitted before consent is obtained.

ModeTags LoadData Before ConsentModelingLegal Risk
BasicAfter consentNoneNoneLow
AdvancedImmediatelyAnonymized pingsEnhancedRequires validation

Step-by-Step Implementation Guide

Prerequisites

  • A Google tag (gtag.js) installed on every page of your website
  • A Consent Management Platform (CMP) or custom consent solution
  • For Tag Manager users: a consent mode template or custom implementation

A CMP collects and manages user consent. Choose a CMP that integrates with Google Consent Mode V2. Many CMPs provide templates in the Community Template Gallery.

Before any tags fire, set a default consent state for each consent type. It is best practice to scope defaults to regions where consent banners are required.

With gtag.js:

gtag('consent', 'default', {
 'ad_storage': 'denied',
 'ad_user_data': 'denied',
 'ad_personalization': 'denied',
 'analytics_storage': 'denied'
});

With wait_for_update for asynchronous CMPs:

gtag('consent', 'default', {
 'ad_storage': 'denied',
 'wait_for_update': 500 // milliseconds to wait for CMP
});

When a user interacts with your consent banner, update the consent state.

Grant all consent:

function allConsentGranted() {
 gtag('consent', 'update', {
 'ad_user_data': 'granted',
 'ad_personalization': 'granted',
 'ad_storage': 'granted',
 'analytics_storage': 'granted'
 });
}

Revoke consent:

gtag('consent', 'update', {
 'analytics_storage': 'denied',
 'ad_storage': 'denied',
 'ad_user_data': 'denied',
 'ad_personalization': 'denied'
});

Step 4: Complete Implementation Example

The order of execution is critical:

  1. Load the Google tag (gtag.js) with default consent
  2. Load your consent solution
  3. Update consent when the user makes a choice

Complete example:

<script>
// Define dataLayer and gtag function
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Set default consent to 'denied'
gtag('consent', 'default', {
 'ad_storage': 'denied',
 'ad_user_data': 'denied',
 'ad_personalization': 'denied',
 'analytics_storage': 'denied'
});
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
<!-- Consent update function -->
<script>
function allConsentGranted() {
 gtag('consent', 'update', {
 'ad_user_data': 'granted',
 'ad_personalization': 'granted',
 'ad_storage': 'granted',
 'analytics_storage': 'granted'
 });
}
</script>
<!-- Call this when user accepts -->
<button onclick="allConsentGranted()">Accept all</button>

Step 5: Test and Debug

Use Google Tag Assistant or the Tag Manager preview mode to validate:

  • Default consent states are set before tags fire
  • Consent updates are triggered correctly
  • Tags behave according to consent choices

Marketing Best Practices

Optimize with Modeled Data

For non-consenting users, focus on broader trends and patterns rather than granular details. Use the aggregated, modeled data to optimize campaigns.

Segment Audiences

Use consent status as a segmentation dimension. Develop different strategies for consented vs. non-consented users.

Adapt to Data Gaps

Avoid over-reliance on granular insights from non-consenting users. Consider broader patterns and adapt strategies based on overall trends.

Common Implementation Mistakes

MistakeFix
Setting defaults after tags fireSet default consent before any config or event commands
Not persisting consent choicesStore choices in first-party cookie or localStorage
Only setting ad_storage and analytics_storageAlso set ad_user_data and ad_personalization
Not testing consent updatesUse Tag Assistant to verify update triggers
Choosing Basic mode when Advanced is neededEvaluate your modeling needs and legal requirements

Key Takeaways

  1. Consent Mode V2 has been mandatory since March 2024 for any website serving EEA/UK users with Google Ads or GA4.
  2. Four consent parameters are required:ad_storage, analytics_storage, ad_user_data, and ad_personalization.
  3. Two implementation modes exist: Basic (tags blocked until consent) and Advanced (anonymized pings before consent for modeling).
  4. Set default consent before tags fire. The order of execution is critical-defaults must be set before any measurement commands.
  5. Use wait_for_update when your CMP loads asynchronously to prevent tags from firing before consent is processed.
  6. Advanced mode can recover up to 70% of lost conversions through AI-powered data modeling.
  7. Persist consent choices using your own mechanism (cookie or localStorage) so the correct state persists across page loads.

Conclusion

Google Consent Mode V2 is no longer optional for businesses serving European users while running Google Ads or GA4. Since March 2024, implementation has been mandatory to retain remarketing and advertising measurement capabilities.

The framework balances compliance with performance. Basic mode offers strict GDPR compliance with a simple setup. Advanced mode provides enhanced conversion modeling through anonymized signals, recovering up to 70% of lost conversions.

Implementation requires a CMP, default consent states set before tags fire, and consent updates triggered by user interactions. Test thoroughly with Tag Assistant and monitor for changes in consent behavior as privacy regulations evolve.

Resources

Need help implementing Google Consent Mode V2? Playful Sparkle has been engineering digital products since 2004, offering Web Development, SEO & Digital Marketing, and App Development services. Our team can help you implement Consent Mode V2 correctly, ensuring compliance while preserving your advertising and analytics capabilities. Contact us to discuss how we can help.

Was this helpful - Post
Zsolt Oroszlány

Zsolt Oroszlány

Founder & Chief Creative Officer of Playful Sparkle since 2004, combining business leadership, digital strategy, design, and software engineering to help organizations build effective digital solutions. Regularly publishes insights on web development, SEO, design, and emerging technologies.