Google Consent Mode v2
LiteConsent integrates natively with Google Consent Mode v2, ensuring your Google Analytics 4 and Google Ads tags respect user consent choices automatically.
What is Google Consent Mode?
Google Consent Mode is a framework that lets Google tags adjust their behavior based on consent status. Instead of blocking Google tags entirely, consent mode tells them which types of data collection are permitted. This allows features like conversion modeling even when full consent isn't granted.
How LiteConsent maps categories
The mapping between Google consent types and your cookie categories is configurable. In each category's settings (Categories & Cookies tab), you can assign a Google Consent Mode type using the dropdown. By default, new sites map Analytics to analytics_storage and Marketing to ad_storage.
| Google consent type | LiteConsent category (default) |
|---|---|
| analytics_storage | Analytics (configurable) |
| ad_storage | Marketing (configurable) |
| ad_user_data | Marketing (follows ad_storage) |
| ad_personalization | Marketing (follows ad_storage) |
| functionality_storage | Always granted (not controllable via consent) |
| security_storage | Always granted (not controllable via consent) |
Setup
Google Consent Mode is always active in LiteConsent. No toggle is needed. Just configure which categories map to analytics_storage and ad_storage in the Categories & Cookies tab.
- In your site's Categories & Cookies tab, assign the appropriate Google Consent Mode type to each category using the dropdown.
- Make sure the LiteConsent script loads before your Google tags (gtag.js or GTM). The LiteConsent script sets default consent state on page load.
- No changes are needed to your Google tags. LiteConsent calls
gtag('consent', 'update', ...)automatically when consent changes.
With Google Tag Manager
If you use GTM, LiteConsent's consent mode integration works seamlessly. GTM reads the consent state set by LiteConsent and fires or blocks tags accordingly. Enable the "Consent Overview" in GTM to verify that your tags respect the correct consent signals.
Why Consent Mode v2 matters
Starting March 2024, Google requires Consent Mode v2 for advertisers serving ads in the European Economic Area. Without it, you cannot use audience building, remarketing, or conversion measurement for EEA users in Google Ads. The requirement stems from the EU Digital Markets Act (DMA), which designates Google as a "gatekeeper" and requires it to respect user consent signals.
LiteConsent implements Consent Mode v2 natively, including the two new signals introduced in v2: ad_user_data and ad_personalization. These are sent automatically alongside ad_storage and analytics_storage.
Basic vs. Advanced mode
Basic mode
Google tags do not load at all until consent is granted. No data is sent to Google before consent. This is the most privacy-conservative approach but means you lose all measurement data from visitors who don't consent.
Advanced mode (recommended)
Google tags load on every page but respect consent signals. Before consent, tags send cookieless pings (no cookies are set, no user identifiers are stored). Google uses these pings for conversion modeling and behavioral modeling to fill data gaps from non-consenting users. This is LiteConsent's default behavior.
Impact on Google Ads
With Consent Mode v2 in Advanced mode, Google Ads can:
- Conversion modeling: Google models conversions from non-consenting users based on patterns from consenting users. This helps recover measurement accuracy.
- Audience building: Remarketing lists and audience signals continue to work for consenting users. Non-consenting users are excluded.
- Enhanced conversions: If you use enhanced conversions, they only fire when
ad_user_datais granted.
Without Consent Mode, you would lose all measurement for EEA users who don't consent, with no modeling to compensate.
Impact on GA4
Google Analytics 4 uses Consent Mode to determine what data it can collect:
- When
analytics_storageis denied, GA4 sends cookieless pings. These pings include basic page data but no user identifiers or cookies. - Behavioral modeling: GA4 uses machine learning to estimate the behavior of non-consenting users based on data from consenting users. This fills gaps in reports like user counts, session counts, and conversion rates.
- Behavioral modeling requires a minimum threshold of consenting users (typically 1,000+ daily events with consent granted in the past 28 days).
Verifying Consent Mode
After installing LiteConsent, verify that Consent Mode is working correctly:
- Chrome DevTools: Open the Console tab and search for
consent. You should see agtag('consent', 'default', ...)call on page load, and agtag('consent', 'update', ...)call after the user interacts with the banner. - Google Tag Assistant: Use the Tag Assistant Chrome extension to inspect consent signals in real time. It shows the consent state for each Google tag.
- GTM Consent Overview: In Google Tag Manager, go to Admin → Container Settings → Enable consent overview. This shows which tags require which consent types and whether they're firing correctly.
- GA4 Real-time report: Check the real-time report in GA4. After granting consent, you should see your visit appear. After denying consent, the visit should still appear as a modeled event (if behavioral modeling is active).
Common issues
Default consent not set before Google tags load
If your Google tags load before the LiteConsent script, they won't see the default consent state. Make sure the LiteConsent script is the first script in your <head>.
Consent signals not updating after user choice
If you see the default state but no update after user interaction, check that the Google consent type mapping is set up correctly in the Categories & Cookies tab.
No conversion modeling in reports
Conversion modeling requires Advanced mode (tags load before consent) and a sufficient volume of consenting users. If you're using Basic mode (tags blocked until consent), modeling won't work. Also, modeling may take 24 to 48 hours to appear in reports after setup.