Consent Mode v2 is Google’s framework for adjusting how Google tags behave based on user consent choices. It allows you to maintain measurement capabilities while respecting privacy regulations like GDPR and CCPA.

As of March 2024, Consent Mode v2 is required for advertisers using Google Ads in the European Economic Area (EEA). Without proper implementation, remarketing audiences stop populating and conversion measurement degrades significantly.

This guide walks through the complete implementation process in Google Tag Manager.


Consent Mode is a communication layer between your consent management platform (CMP) and Google tags. It tells Google tags what type of consent the user has granted or denied.

How It Works

  1. User lands on your website
  2. Your consent banner appears
  3. User makes consent choices (accept, reject, customize)
  4. Consent Mode communicates these choices to Google tags
  5. Google tags adjust their behavior based on consent state

What Changed in v2

Consent Mode v2 introduced two new consent parameters:

ad_user_data: Controls whether user data can be sent to Google for advertising purposes.

ad_personalization: Controls whether personalized advertising is allowed.

These join the original parameters:

analytics_storage: Controls Google Analytics cookies.

ad_storage: Controls advertising cookies (Google Ads, Floodlight).

All four parameters must be implemented for full Consent Mode v2 compliance.


Regulatory Compliance

GDPR, ePrivacy Directive, and similar regulations require explicit consent before setting non-essential cookies. Consent Mode ensures Google tags respect these requirements.

Continued Measurement

Without Consent Mode, denied consent means zero data. With Consent Mode, Google uses conversion modeling to estimate conversions from users who declined consent. You maintain directional measurement without violating privacy.

For EEA traffic, Google requires Consent Mode v2 implementation to:

Without it, your Google Ads campaigns in Europe operate blind.


Each consent parameter can be in one of two states:

Granted

User consented to this type of tracking. Tags behave normally.

ad_storage: 'granted'
analytics_storage: 'granted'
ad_user_data: 'granted'
ad_personalization: 'granted'

Denied

User did not consent (or has not yet responded). Tags adjust behavior:

ad_storage: 'denied'
analytics_storage: 'denied'
ad_user_data: 'denied'
ad_personalization: 'denied'

Implementation Overview

Consent Mode v2 implementation involves three components:

  1. Default consent state: Set before any tags fire
  2. Consent update: Triggered when user makes a choice
  3. Tag configuration: Ensure tags respect consent state

The implementation method depends on your consent management platform.


Method 1: Using a Google-Certified CMP with Built-In Support

Many consent management platforms have native Consent Mode v2 integration.

Supported CMPs Include:

Implementation Steps

Each CMP has different settings. Generally:

  1. Log into your CMP dashboard
  2. Find the Google Consent Mode settings
  3. Enable Consent Mode v2
  4. Map your consent categories to Google’s parameters:
    • Marketing/Advertising → ad_storage, ad_user_data, ad_personalization
    • Analytics/Statistics → analytics_storage
  5. Save configuration

Step 2: Add CMP Tag in GTM

Most CMPs provide a GTM template:

  1. In GTM, go to Templates → Search Gallery
  2. Search for your CMP (e.g., “Cookiebot”)
  3. Add the template to your workspace
  4. Create a new tag using the template
  5. Configure with your CMP account ID
  6. Set trigger to “Consent Initialization - All Pages”

The “Consent Initialization” trigger fires before all other triggers, ensuring consent state is set first.

  1. Go to Admin → Container Settings
  2. Enable “Enable consent overview”
  3. Save

This shows consent status for each tag in your container.

For each Google tag, verify consent settings:

  1. Open the tag
  2. Go to Advanced Settings → Consent Settings
  3. Set “Built-in Consent Checks” or specify required consent types
  4. Save

Google tags (GA4, Google Ads) have built-in consent checks. They automatically respect Consent Mode states.

Step 5: Test the Implementation

  1. Open GTM Preview Mode
  2. Load your site
  3. Check that consent defaults are set before tags fire
  4. Accept consent in the banner
  5. Verify consent updates to “granted”
  6. Verify tags fire after consent is granted

Method 2: Manual Implementation with gtag.js

If your CMP does not have built-in Consent Mode support, implement manually.

Create a Custom HTML tag that sets the default state before any other tags fire.

  1. Go to Tags → New
  2. Name it “Consent Mode - Default State”
  3. Select “Custom HTML”
  4. Enter:
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  
  // Set default consent state - denied until user consents
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied',
    'wait_for_update': 500  // Wait 500ms for consent banner response
  });
  
  // Optional: Set default for specific regions only
  // gtag('consent', 'default', {
  //   'ad_storage': 'denied',
  //   'region': ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'IS', 'LI', 'NO', 'GB']
  // });
</script>
  1. Set trigger to “Consent Initialization - All Pages”
  2. Save

Create a tag that updates consent when the user makes a choice.

  1. Go to Tags → New
  2. Name it “Consent Mode - Update Function”
  3. Select “Custom HTML”
  4. Enter:
<script>
  // Function to update consent state
  window.updateConsent = function(consentSettings) {
    gtag('consent', 'update', consentSettings);
    
    // Push event for GTM triggers
    window.dataLayer.push({
      'event': 'consent_update',
      'consent_analytics': consentSettings.analytics_storage,
      'consent_ads': consentSettings.ad_storage,
      'consent_ad_user_data': consentSettings.ad_user_data,
      'consent_ad_personalization': consentSettings.ad_personalization
    });
  };
</script>
  1. Set trigger to “Consent Initialization - All Pages”
  2. Save

Your consent banner must call the update function when the user makes a choice.

When user accepts all:

window.updateConsent({
  'ad_storage': 'granted',
  'ad_user_data': 'granted',
  'ad_personalization': 'granted',
  'analytics_storage': 'granted'
});

When user rejects all:

window.updateConsent({
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'analytics_storage': 'denied'
});

When user makes custom choices:

window.updateConsent({
  'ad_storage': userAcceptedMarketing ? 'granted' : 'denied',
  'ad_user_data': userAcceptedMarketing ? 'granted' : 'denied',
  'ad_personalization': userAcceptedMarketing ? 'granted' : 'denied',
  'analytics_storage': userAcceptedAnalytics ? 'granted' : 'denied'
});

Step 4: Handle Returning Users

If a user previously consented, restore their consent state on page load:

// Check stored consent preference
var storedConsent = localStorage.getItem('user_consent');

if (storedConsent) {
  var consent = JSON.parse(storedConsent);
  gtag('consent', 'update', consent);
}

Add this logic to your default consent tag or consent banner initialization.


GTM provides a built-in consent mode template for common scenarios.

  1. Go to Tags → New
  2. Click “Discover more tag types in the Community Template Gallery”
  3. Search for “Consent Mode”
  4. Select a suitable template (e.g., “Consent Mode (Google tags)”)
  5. Add to workspace

Create a tag using the template:

  1. Name it “Consent Mode - Defaults”
  2. Set Implementation Type to “Default consent settings”
  3. Configure each parameter:
    • ad_storage: Denied
    • ad_user_data: Denied
    • ad_personalization: Denied
    • analytics_storage: Denied
  4. Set Wait for Update: 500ms
  5. Set trigger to “Consent Initialization - All Pages”
  6. Save

Create another tag for updates:

  1. Name it “Consent Mode - Update”
  2. Set Implementation Type to “Update consent settings”
  3. Map variables for each parameter (from your CMP)
  4. Set trigger to fire when CMP updates consent
  5. Save

With Consent Mode implemented, configure how individual tags respond.

Google tags (GA4, Google Ads) automatically respond to Consent Mode. No additional configuration needed.

When analytics_storage is denied:

When ad_storage is denied:

Non-Google Tags

Third-party tags (Meta Pixel, LinkedIn, etc.) do not automatically respect Consent Mode. Configure them manually.

  1. Open the tag
  2. Go to Advanced Settings → Consent Settings
  3. Select “Require additional consent for tag to fire”
  4. Add required consent type (e.g., “ad_storage”)
  5. Save

The tag will only fire when the specified consent is granted.

Create triggers that only fire when consent is granted:

  1. Create a Custom Event trigger for your CMP’s consent event
  2. Add conditions: consent_ads equals “granted”
  3. Use this trigger for advertising tags

Thorough testing is critical. Consent Mode errors can break tracking entirely or violate privacy regulations.

Step 1: Test Default State

  1. Clear cookies and site data
  2. Open GTM Preview Mode
  3. Load your website
  4. Before interacting with the consent banner, check:
    • Data Layer shows consent default command
    • All consent parameters are “denied”
    • Google tags show “fired” but with consent-adjusted behavior
  1. Click “Accept All” on consent banner
  2. Check:
    • Data Layer shows consent update command
    • All parameters change to “granted”
    • Tags that were waiting now fire fully
  1. Clear cookies and reload
  2. Click “Reject All” on consent banner
  3. Check:
    • Consent parameters remain “denied”
    • Tags fire in limited mode or do not fire
  1. Clear cookies and reload
  2. Open consent preferences
  3. Accept Analytics, reject Marketing
  4. Check:
    • analytics_storage: granted
    • ad_storage: denied
    • GA4 fires normally
    • Google Ads fires in limited mode

Step 5: Test Returning Users

  1. Accept consent
  2. Close and reopen the browser
  3. Check that consent state persists
  4. Tags should fire with previously granted consent

Using Google Tag Assistant

Google Tag Assistant shows Consent Mode state:

  1. Install Tag Assistant browser extension
  2. Enable recording
  3. Navigate your site
  4. Check the “Consent” tab for each tag
  5. Verify consent states match expectations

Advanced Configuration

Region-Specific Defaults

Apply different defaults based on user location:

gtag('consent', 'default', {
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'analytics_storage': 'denied',
  'region': ['BE', 'BG', 'CZ', 'DK', 'DE', 'EE', 'IE', 'GR', 'ES', 'FR', 'HR', 'IT', 'CY', 'LV', 'LT', 'LU', 'HU', 'MT', 'NL', 'AT', 'PL', 'PT', 'RO', 'SI', 'SK', 'FI', 'SE', 'GB', 'IS', 'LI', 'NO', 'CH']
});

gtag('consent', 'default', {
  'ad_storage': 'granted',
  'ad_user_data': 'granted',
  'ad_personalization': 'granted',
  'analytics_storage': 'granted',
  'region': ['US']
});

EEA users start with denied consent. US users start with granted.

URL Passthrough

When consent is denied, enable URL passthrough to maintain attribution:

gtag('set', 'url_passthrough', true);

This passes click identifiers (gclid, dclid) through URL parameters instead of cookies.

Ads Data Redaction

Control what data is sent when ad_storage is denied:

gtag('set', 'ads_data_redaction', true);

When enabled with ad_storage denied, ad click identifiers are redacted from requests.


Common Implementation Mistakes

Mistake 1: Setting Default After Tags Fire

Consent defaults must be set before any Google tags. Use “Consent Initialization” trigger, not “All Pages.”

Wrong trigger order:

  1. GA4 Configuration fires
  2. Consent defaults set

Correct trigger order:

  1. Consent defaults set
  2. GA4 Configuration fires

Consent Mode v2 requires all four parameters. Missing ad_user_data or ad_personalization means incomplete implementation.

// Incomplete - missing v2 parameters
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'analytics_storage': 'denied'
});

// Complete - all v2 parameters
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'analytics_storage': 'denied'
});

Setting defaults but never calling consent update means consent is always denied, even after user accepts.

Ensure your CMP triggers the update command.

Mistake 4: CMP Loading Too Late

If your consent banner loads after Google tags attempt to fire, consent mode cannot work properly.

Ensure CMP scripts load early, preferably in the <head> before GTM.

If consent choices are not saved, users see the banner on every page. Implement proper cookie or localStorage persistence.

Mistake 6: Testing in Wrong Region

Consent Mode behavior may vary by region. Test from EEA IP addresses (or simulate) to verify behavior for regulated users.


Verifying Implementation in Google Ads

After implementation, verify Google Ads receives proper consent signals.

Check Conversion Tracking Status

  1. In Google Ads, go to Goals → Conversions → Summary
  2. Click on a conversion action
  3. Look for “Consent mode” status
  4. Should show: “Consent mode detected”

Check Tag Diagnostics

  1. Go to Tools → Data Manager → Diagnostics
  2. Review any consent-related warnings
  3. Address issues flagged

Monitor Conversion Modeling

With Consent Mode, Google models conversions from users who denied consent:

  1. In campaign reports, add “Conversions” column
  2. Modeled conversions are included in the total
  3. You cannot see modeled vs observed separately in standard reports

Server-side GTM requires additional consideration for Consent Mode.

The web container must pass consent state to the server container:

// Include consent state in events sent to server
window.dataLayer.push({
  'event': 'purchase',
  'consent_state': {
    'ad_storage': 'granted',
    'analytics_storage': 'granted',
    'ad_user_data': 'granted',
    'ad_personalization': 'granted'
  }
});

Server Container Configuration

In your server container:

  1. Create a variable to extract consent state from incoming requests
  2. Use the Consent Mode template in server GTM
  3. Set consent state before firing server-side tags

Monitoring and Maintenance

Consent Mode is not set-and-forget. Monitor ongoing compliance.

Regular Audits

Monthly, verify:

CMP Updates

When your CMP updates, retest:

New Tag Reviews

When adding new tags:

  1. Determine what consent the tag requires
  2. Configure consent settings appropriately
  3. Test in denied state
  4. Test in granted state

Key Takeaway

Consent Mode v2 is required for compliant advertising measurement in regulated markets. It allows Google tags to adapt behavior based on user consent while maintaining measurement through conversion modeling.

Implementation requires setting default consent states before tags fire, updating consent when users make choices, and configuring tags to respect consent. Use a certified CMP with built-in support for the simplest implementation, or configure manually with gtag.js commands.

Test thoroughly across consent states and regions. Monitor ongoing compliance as you add new tags and as regulations evolve.

Without Consent Mode v2, your Google Ads campaigns in the EEA cannot build audiences or measure conversions effectively. With it, you balance privacy compliance and advertising performance.

Related Posts

Why Consent Mode Is Silently Killing Your Google Ads Conversions

13 min read

Consent ModeGoogle AdsGDPRConversion TrackingCookie BannerConsent Mode Series

Consent Mode Data Loss: How to Recover Tracking with Third-Party Tools

15 min read

Consent ModeServer-Side TrackingPrivacyAnalyticsAttributionConsent Mode Series

GA4 and Consent Mode v2 - How to Keep Tracking Without Killing Data Quality

9 min read

GA4Consent ModeGDPRPrivacyTrackingGA4 Intro Series
Adnan Agic

Adnan Agic

Google Ads Strategist & Technical Marketing Expert with 5+ years experience managing $10M+ in ad spend across 100+ accounts.

Need Help With Your Google Ads?

I help e-commerce brands scale profitably with data-driven PPC strategies.

Get In Touch
Back to Blog