GTM & Consent Mode v2
Learn how to integrate Cookiefy with Google Tag Manager and implement Google Consent Mode v2 for full GDPR compliance.
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.
ad_storageControls storage for advertising purposes (e.g., cookies)
ad_user_dataControls sending user data to Google for advertising
ad_personalizationControls personalized advertising
analytics_storageControls storage for analytics purposes
functionality_storageControls storage for website functionality
personalization_storageControls storage for personalization features
security_storageControls storage for security purposes (always granted)
Setup Guide
Choose your preferred integration method
Zero Configuration Required
Script Loads
Cookiefy sets default consent to 'denied' for all non-essential categories immediately, before any Google tags load.
User Makes Choice
When the user interacts with the consent banner, their preferences are captured and stored.
Consent Updated
Cookiefy automatically calls gtag with 'consent update' and the appropriate consent states.
Tags Respond
Google tags automatically adjust their behavior based on the consent state - no manual configuration required.
// 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
});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'))Successful Integration Checklist
- cookie_consent_default event fires on page load
- cookie_consent_update event fires when user accepts/rejects
- Google tags show 'Consent granted/denied' in Tag Assistant
Ready to Get Started?
Set up Google Consent Mode v2 with Cookiefy in minutes.