Google Tag Manager Integration

GTM & Consent Mode v2

Learn how to integrate Cookiefy with Google Tag Manager and implement Google Consent Mode v2 for full GDPR compliance.

Consent Mode v2
GDPR Compliant
Easy Setup
What is Google Consent Mode v2?

Google Consent Mode v2 is a framework that allows you to adjust how Google tags behave based on user consent. It's required for using Google Ads and Analytics in the EEA starting March 2024. Cookiefy automatically implements all required consent signals.

Required for EEA

Google Consent Mode v2 is mandatory for all websites using Google advertising products in the European Economic Area.

Preserve Conversions

Even without full consent, Consent Mode enables Google to model conversions using privacy-safe signals, preserving your analytics data.

Consent Signal Types
Cookiefy manages all 7 Google consent signals automatically based on user choices.
ad_storage

Controls storage for advertising purposes (e.g., cookies)

Marketing
ad_user_data

Controls sending user data to Google for advertising

Marketing
ad_personalization

Controls personalized advertising

Marketing
analytics_storage

Controls storage for analytics purposes

Analytics
functionality_storage

Controls storage for website functionality

Preferences
personalization_storage

Controls storage for personalization features

Preferences
security_storage

Controls storage for security purposes (always granted)

Necessary

Setup Guide

Choose your preferred integration method

How It Works
1

Script Loads

Cookiefy sets default consent to 'denied' for all non-essential categories immediately, before any Google tags load.

2

User Makes Choice

When the user interacts with the consent banner, their preferences are captured and stored.

3

Consent Updated

Cookiefy automatically calls gtag with 'consent update' and the appropriate consent states.

4

Tags Respond

Google tags automatically adjust their behavior based on the consent state - no manual configuration required.

What Cookiefy Does Automatically
// Google Consent Mode v2 - Automatic with Cookiefy
// No manual configuration needed - Cookiefy handles this automatically

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

// Default consent state (set by Cookiefy before GTM loads)
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
});
Testing Your Integration

Verify that Google Consent Mode is working correctly on your website.

Google Tag Assistant

Use Google's official tool to verify consent signals are being sent correctly.

Browser Console

Check the dataLayer for consent events directly in your browser's developer console.

dataLayer.filter(e => e.event?.includes('consent'))

Ready to Get Started?

Set up Google Consent Mode v2 with Cookiefy in minutes.

    Google Tag Manager Integration - Consent Mode v2 | Cookiefy