Google Consent Mode v2 Integration
Our Cookie Banner Widget is fully compatible with Google Consent Mode v2. Follow this guide to ensure compliance with Google's requirements.
What is Google Consent Mode v2?
Google Consent Mode v2 is a framework that adjusts how Google tags behave based on user consent. Since March 2024, it's mandatory for websites using Google Ads or Analytics in the EU/EEA.
✅ Our widget handles:
- •
ad_storage- Advertising cookies - •
ad_user_data- User data for ads - •
ad_personalization- Ad personalization - •
analytics_storage- Analytics cookies - •
functionality_storage- Functional cookies - •
personalization_storage- Personalization
Integration Steps
1
Add the Widget Script FIRST
The widget script must load before any Google tags. Add it in your <head>:
<!-- PrivacyChecker Cookie Banner - MUST be first -->
<script src="https://privacychecker.pro/widget.js"
data-widget-id="YOUR_WIDGET_ID"></script>
<!-- Then your Google Tag -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');
</script>2
For Google Tag Manager
If using GTM, enable "Consent Overview" in your container settings:
- Go to GTM → Admin → Container Settings
- Enable "Enable consent overview"
- For each tag, set the required consent types
3
Verify Integration
Check that consent mode is working:
- Open Chrome DevTools → Console
- Type
dataLayerand press Enter - Look for
consententries with "default" and "update"
Category Mapping
Our widget categories map to Google consent types:
| Widget Category | Google Consent Types |
|---|---|
| Necessary | security_storage (always granted) |
| Analytics | analytics_storage |
| Marketing | ad_storage, ad_user_data, ad_personalization |
| Functional | functionality_storage, personalization_storage |