When a visitor rejects analytics cookies, your Google tags need to know – and behave accordingly. That is what Consent Mode does. It works together with your cookie consent banner.
The consent signals
| Signal | Controls |
|---|---|
analytics_storage | Analytics cookies |
ad_storage | Advertising cookies |
ad_user_data | Sending user data to Google for advertising |
ad_personalization | Personalised advertising (remarketing) |
Basic and advanced
- Basic: Google tags only load after the visitor consents. No data without consent.
- Advanced: tags load with denied defaults and send cookie-less pings; Google models missing conversions.
Implementation outline
// Before any Google tag: set defaults to denied
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('consent', 'default', {
analytics_storage: 'denied', ad_storage: 'denied',
ad_user_data: 'denied', ad_personalization: 'denied'
});
// When the visitor accepts analytics in your banner:
gtag('consent', 'update', { analytics_storage: 'granted' });Many consent platforms set these signals automatically.
What to check
- The banner offers a real reject option.
- No tracking requests before a choice (inspect the Network tab).
- Choices are remembered and can be changed.
- Your privacy statement explains what happens in each case.
Frequently asked questions
Basic or advanced Consent Mode?
Basic is the most privacy-friendly: nothing is sent to Google without consent. Advanced sends cookie-less pings that Google uses for modelling; whether that is acceptable depends on legal advice and your national authority’s view.
Do I need Consent Mode if I do not use Google tools?
No. It only concerns Google tags such as Google Analytics and Google Ads.