Google Consent ModeGDPRAnalytics

Implementing Google Consent Mode v2: A Developer and Marketer Guide

J

Jerisaliant

Author

What Is Google Consent Mode v2?

Google Consent Mode v2 is a framework that allows your website to adjust the behavior of Google tags (Analytics, Ads, Floodlight) based on the consent status of your visitors. Launched as a mandatory requirement for advertisers serving ads in the EEA starting March 2024, Consent Mode v2 introduced two new consent types and became essential for maintaining measurement accuracy while respecting user privacy.

With EUR 5.88 billion in total GDPR fines since 2018 (DLA Piper, January 2025), the stakes for getting consent implementation right have never been higher.

The 7 Consent Types

Google Consent Mode v2 supports seven distinct consent signals:

  1. ad_storage: Controls cookies used for advertising (Google Ads remarketing, conversion tracking).
  2. analytics_storage: Controls cookies used for analytics (Google Analytics page views, events).
  3. ad_user_data: Controls whether user data can be sent to Google for advertising purposes.
  4. ad_personalization: Controls whether data can be used for ad personalization (remarketing lists).
  5. functionality_storage: Controls cookies that support site functionality (language preferences, chat widgets).
  6. personalization_storage: Controls cookies for personalization (video recommendations, content suggestions).
  7. security_storage: Controls cookies related to security (authentication, fraud prevention). Typically always granted.

Basic vs. Advanced Consent Mode

Basic Mode

In Basic mode, no Google tags fire until the user grants consent. This is the strictest implementation:

  • Tags are completely blocked before consent.
  • No data of any kind is sent to Google before consent.
  • After consent is granted, tags fire normally.
  • Conversion modeling is limited because Google has no pre-consent signals.

Advanced Mode

In Advanced mode, Google tags load immediately but send cookieless pings when consent is denied:

  • Tags fire on every page load, regardless of consent state.
  • When consent is denied, only anonymized, cookieless data is collected.
  • This data powers Google's conversion modeling, filling gaps left by users who deny consent.
  • When consent is granted, full tracking resumes with cookies.

Google recommends Advanced mode for better measurement accuracy. It can recover up to 70% of ad-click-to-conversion journeys that would otherwise be lost.

Implementation via gtag.js

To implement Consent Mode with gtag.js, add the default consent state before the Google tag loads:


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

When the user interacts with your consent banner, update the consent state:


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

Implementation via Google Tag Manager

For GTM implementations, configure consent initialization triggers and use the built-in consent settings at the tag level. Each tag can be configured to require specific consent types before firing, and GTM's consent overview provides a visual dashboard of consent dependencies across all your tags.

Testing and Debugging

Validate your implementation using:

  • Google Tag Assistant: Shows consent state per tag and whether tags are firing in full or cookieless mode.
  • Browser DevTools Network tab: Look for the gcs parameter in Google tag requests. Values like G111 indicate granted states.
  • Google Analytics DebugView: Real-time event stream showing which events have consent signals attached.

Jerisaliant integrates natively with Google Consent Mode v2, automatically mapping cookie category consent to all 7 Google consent types without additional configuration.

Ensure DPDPA Compliance Today

Ready to make your business compliant? Run a free gap assessment or talk to our experts.