---
title: "Google Consent Mode v2: Complete Implementation Guide"
description: "How to implement Google Consent Mode v2 in compliance with GDPR and Digital Markets Act. Consent categories, GTM implementation, and impact on GA4 and Google Ads tracking."
date: 2025-10-18
updated: 2025-01-11
category: Analytics
tags: ["Google Consent Mode", "GDPR", "GTM", "GA4", "Privacy", "Cookies"]
url: https://uper.pl/en/blog/google-consent-mode-v2/
---

# Google Consent Mode v2: Complete Implementation Guide

**Google Consent Mode v2** is an updated version of the user consent management mechanism that became mandatory for advertisers in the European Economic Area (EEA) from March 2024. Without proper implementation, you lose conversion data and remarketing capabilities in Google Ads.

## What is Google Consent Mode?

**Consent Mode** is a Google API that allows you to adjust the behavior of Google tags (Analytics, Ads, Floodlight) based on user cookie consent. Instead of completely blocking tags when a user denies consent, Consent Mode sends "cookieless pings" that enable conversion modeling.

### Difference Between v1 and v2

| Feature | Consent Mode v1 | Consent Mode v2 |
|---------|-----------------|-----------------|
| Consent parameters | 2 (analytics_storage, ad_storage) | 4+ (added ad_user_data, ad_personalization) |
| Legal requirements | GDPR | GDPR + Digital Markets Act (DMA) |
| Mandatory from | - | March 2024 (EEA) |
| Impact on remarketing | Partial | Full - no consent, no remarketing |

## Consent Parameters in Consent Mode v2

### Required Parameters

```javascript
gtag('consent', 'default', {
  'ad_storage': 'denied',           // Advertising cookies
  'ad_user_data': 'denied',         // Sending user data to Google Ads
  'ad_personalization': 'denied',   // Ad personalization (remarketing)
  'analytics_storage': 'denied',    // Analytics cookies (GA4)
  'wait_for_update': 500            // Wait time for CMP (ms)
});
```

### Parameter Descriptions

| Parameter | Description | Tag Impact |
|-----------|-------------|------------|
| `ad_storage` | Storage of advertising cookies | Google Ads conversion tracking |
| `ad_user_data` | Sending user data to Google | Customer Match, Enhanced Conversions |
| `ad_personalization` | Ad personalization | Remarketing, similar audiences |
| `analytics_storage` | Storage of analytics cookies | GA4 cookies (_ga, _gid) |

### Optional Parameters

```javascript
gtag('consent', 'default', {
  // ... required parameters
  'functionality_storage': 'denied',    // Functional cookies (preferences)
  'personalization_storage': 'denied',  // Content personalization
  'security_storage': 'granted'         // Security (always granted)
});
```

## Implementation Modes

### Basic Mode

In basic mode, Google tags are **not loaded** until the user gives consent. This is the simplest implementation, but you lose conversion modeling capability.

```javascript
// Tags loaded only after consent
if (userConsented) {
  // Load gtag.js
}
```

### Advanced Mode - RECOMMENDED

In advanced mode, tags are **always loaded**, but their behavior adjusts to consent. When consent is denied, "cookieless pings" are sent - anonymous data without user identifiers.

```javascript
// Tags always loaded, behavior depends on consent
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'analytics_storage': 'denied'
});

// Later, after consent is given
gtag('consent', 'update', {
  'ad_storage': 'granted',
  'ad_user_data': 'granted',
  'ad_personalization': 'granted',
  'analytics_storage': 'granted'
});
```

## Implementation in Google Tag Manager

### Step 1: Enable Consent Mode in Container

1. Open GTM container
2. Go to **Admin** → **Container Settings**
3. Check **Enable consent overview**

### Step 2: Add Default Consent Settings

Create a **Consent Initialization - All Pages** tag (type: Custom HTML) with highest priority:

```html
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}

  // Default settings - everything blocked
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied',
    'functionality_storage': 'denied',
    'personalization_storage': 'denied',
    'security_storage': 'granted',
    'wait_for_update': 500
  });

  // Region-specific defaults (optional)
  gtag('consent', 'default', {
    'ad_storage': 'granted',
    'ad_user_data': 'granted',
    'ad_personalization': 'granted',
    'analytics_storage': 'granted',
    'region': ['US', 'CA'] // Outside EEA - default granted
  });
</script>
```

**Trigger:** Consent Initialization - All Pages

### Step 3: Configure Built-in Consent Tags

For GA4 and Google Ads tags:

1. Open tag (e.g., GA4 Configuration)
2. Go to **Advanced Settings** → **Consent Settings**
3. Choose:
   - **No additional consent required** - tag fires always
   - **Require additional consent for tag to fire** - select required consents

### Step 4: Integration with CMP (Consent Management Platform)

Popular CMP platforms with built-in GTM integration:

- **Cookiebot**
- **OneTrust**
- **Usercentrics**
- **Osano**
- **Cookie Information**

#### Example: Cookiebot Integration

```html
<!-- Cookiebot banner script (before GTM) -->
<script
  id="Cookiebot"
  src="https://consent.cookiebot.com/uc.js"
  data-cbid="YOUR-COOKIEBOT-ID"
  data-blockingmode="auto"
  type="text/javascript"
></script>
```

GTM will receive automatic consent updates through `dataLayer`.

#### Example: Custom CMP

If you have your own consent system, send updates to dataLayer:

```javascript
// After clicking "Accept All"
function acceptAllCookies() {
  gtag('consent', 'update', {
    'ad_storage': 'granted',
    'ad_user_data': 'granted',
    'ad_personalization': 'granted',
    'analytics_storage': 'granted'
  });

  // Save choice in localStorage/cookie
  localStorage.setItem('cookie_consent', JSON.stringify({
    ad_storage: true,
    ad_user_data: true,
    ad_personalization: true,
    analytics_storage: true,
    timestamp: Date.now()
  }));
}

// After clicking "Essential Only"
function acceptEssentialOnly() {
  gtag('consent', 'update', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied'
  });

  localStorage.setItem('cookie_consent', JSON.stringify({
    ad_storage: false,
    ad_user_data: false,
    ad_personalization: false,
    analytics_storage: false,
    timestamp: Date.now()
  }));
}
```

### Step 5: Read Saved Consents on Return

```javascript
// At the start of each session
(function() {
  const savedConsent = localStorage.getItem('cookie_consent');
  if (savedConsent) {
    const consent = JSON.parse(savedConsent);
    gtag('consent', 'update', {
      'ad_storage': consent.ad_storage ? 'granted' : 'denied',
      'ad_user_data': consent.ad_user_data ? 'granted' : 'denied',
      'ad_personalization': consent.ad_personalization ? 'granted' : 'denied',
      'analytics_storage': consent.analytics_storage ? 'granted' : 'denied'
    });
  }
})();
```

## Impact on GA4 and Google Ads Data

### When User Gives Consent

Full tracking as before:
- Cookies `_ga`, `_gid` set normally
- Full demographic and interest data
- Remarketing works
- Enhanced Conversions active

### When User Denies Consent (Advanced Mode)

Google applies **Conversion Modeling** and **Behavioral Modeling**:

- **Cookieless pings** - anonymous data without identifiers
- **Conversion modeling** - Google estimates missing conversions based on patterns
- **No remarketing** - user won't be in audience lists
- **No cross-device tracking** - sessions won't be linked

### Requirements for Conversion Modeling

For modeling to work properly, you need:

1. **Minimum data** - sufficient traffic with consents
2. **Advanced Mode** - Basic Mode doesn't support modeling
3. **Google signals** - enabled in GA4
4. **Linking** - GA4 connected to Google Ads

## Verifying Implementation

### GTM Preview Mode

1. Open GTM Preview
2. Check the **Consent** tab
3. Ensure that:
   - Default values are `denied`
   - After banner interaction, values update
   - Tags react to consent changes

### Chrome DevTools

```javascript
// Check current consent state
console.log(google_tag_data.ics.entries);

// Or
dataLayer.filter(item => item[0] === 'consent');
```

### Google Tag Assistant

1. Install the [Google Tag Assistant](https://tagassistant.google.com/) extension
2. Check if tags report correct consent states
3. Look for Consent Mode error messages

### GA4 DebugView

1. Open GA4 → **Configure** → **DebugView**
2. Look for `gcs` (Google Consent State) parameter in events
3. Values:
   - `G100` = all consents granted
   - `G110` = ad_storage denied, analytics granted
   - `G111` = only analytics denied

## Common Problems and Solutions

### Problem: Consent Mode Doesn't Update

**Cause:** Cookie banner doesn't send `gtag('consent', 'update', ...)`.

**Solution:** Check CMP integration or add your own calls.

### Problem: Tags Fire Before Banner

**Cause:** Missing `wait_for_update` or timeout too short.

**Solution:**
```javascript
gtag('consent', 'default', {
  // ...
  'wait_for_update': 2000 // Increase timeout
});
```

### Problem: No Conversion Modeling

**Cause:** Basic Mode or insufficient data.

**Solution:** Switch to Advanced Mode and wait for sufficient data (minimum several hundred conversions with consent).

### Problem: Remarketing Doesn't Work

**Cause:** `ad_personalization: 'denied'`.

**Solution:** This is legally compliant - user denied remarketing consent. Focus on First-Party Data strategies.

## GDPR and DMA Compliance

### Legal Requirements

1. **Explicit consent** - checkbox must be unchecked by default
2. **Easy withdrawal** - user must be able to easily change their mind
3. **Equal options** - "Accept" and "Reject" equally visible
4. **Information** - clear description of what cookies do
5. **Documentation** - record consents as proof

### Digital Markets Act (DMA)

From March 2024, DMA requires:

- Explicit consent for `ad_user_data` and `ad_personalization`
- Without these consents, Google Ads remarketing is impossible
- Enhanced Conversions require `ad_user_data: 'granted'`

## Summary

**Google Consent Mode v2** is an essential element of every website operating in the EEA. Key points:

1. **Mandatory implementation** from March 2024 for advertisers in EEA
2. **Advanced Mode** allows conversion modeling when consent is denied
3. **Four parameters** - `ad_storage`, `ad_user_data`, `ad_personalization`, `analytics_storage`
4. **CMP integration** - use a certified platform for easy implementation
5. **Testing** - GTM Preview, Tag Assistant, GA4 DebugView

Proper implementation protects against loss of conversion data and ensures compliance with GDPR and Digital Markets Act.

## Sources

1. **Google Developers - Consent mode**
[https://developers.google.com/tag-platform/security/guides/consent](https://developers.google.com/tag-platform/security/guides/consent)

2. **Google Ads Help - Consent mode implementation**
[https://support.google.com/google-ads/answer/10000067](https://support.google.com/google-ads/answer/10000067)

3. **Google Analytics Help - Consent mode for websites**
[https://support.google.com/analytics/answer/9976101](https://support.google.com/analytics/answer/9976101)

4. **Google - EU user consent policy**
[https://www.google.com/about/company/user-consent-policy/](https://www.google.com/about/company/user-consent-policy/)

5. **Google Tag Manager - Consent overview**
[https://support.google.com/tagmanager/answer/10718549](https://support.google.com/tagmanager/answer/10718549)

6. **European Commission - Digital Markets Act**
[https://digital-markets-act.ec.europa.eu/](https://digital-markets-act.ec.europa.eu/)
