Google Consent Mode v2 is a framework that lets websites adjust how Google tags behave based on user consent. Starting March 2024, Google requires Consent Mode v2 signals for personalized advertising in the EEA.
How LegalBanner Handles Consent Mode
LegalBanner automatically sends Google Consent Mode v2 signals. No additional configuration is needed.
When a visitor interacts with your consent banner:
1. Before consent: LegalBanner sets all consent signals to denied
2. After consent: LegalBanner updates signals based on the visitor's choices
Consent Mode Signals
| Signal | Maps to | Description |
|--------|---------|-------------|
| ad_storage | Marketing cookies | Controls ad-related cookies |
| analytics_storage | Analytics cookies | Controls analytics cookies |
| ad_user_data | Marketing cookies | Controls sending user data to Google for ads |
| ad_personalization | Marketing cookies | Controls personalized advertising |
| functionality_storage | Functional cookies | Controls functional cookies |
| personalization_storage | Functional cookies | Controls personalization features |
| security_storage | Essential | Always granted (required for security) |
Setup
1. Install the LegalBanner script tag on your site (before Google tags)
2. Configure your consent categories in the banner settings
3. LegalBanner automatically pushes consent updates to gtag() or dataLayer
Advanced Mode vs Basic Mode
Advanced mode (default): Google tags load immediately but in a restricted state. They collect anonymized, cookieless pings. When consent is granted, full tracking begins.
Basic mode: Google tags do not fire at all until consent is granted. No data is collected before consent.
LegalBanner uses Advanced mode by default, which is recommended by Google for better conversion modeling.
Verifying Consent Mode
1. Open Chrome DevTools > Console
2. Look for gtag('consent', 'update', ...) calls after banner interaction
3. Or use the Google Tag Assistant to verify signals
FAQ
Q: Do I need to modify my Google Analytics code?
A: No. LegalBanner injects consent signals before your GA4 tags fire. Just make sure the LegalBanner script loads before gtag.js.
Q: Does Consent Mode affect my analytics data?
A: In Advanced mode, Google uses behavioral modeling to estimate conversions from users who did not consent. Your data will include both observed and modeled conversions.