Working with Google Consent Mode
If enabled, the CMP will send additional consent information to Google Ads and Google Analytics.
Please note, that the Google Consent Mode is currently only supported for Google's "Global site tag" (gtag.js).
Enabling Google Consent Mode
In order to enable the Google Consent Mode, please go to Menu > CMPs > Edit > Other settings and enable Google Consent Mode:
Changing default settings for Google Consent Mode
Although the CMP will automatically set the default status for gtag to denied, it is recommended to set the status manually in your Google Analytics code by adding the following line:
gtag('consent', 'default', {
// Deny consent for ad_storage
'ad_storage': 'denied',
// Grant consent for analytics_storage
'analytics_storage': 'denied'
});
Consent logic
Once the Google Consent Mode is activated, the CMP will automatically send the consent information granted
or denied
to gtag. The CMP will automatically distinguish which Google Vendor is activated/deactivated and will send the correct info to Google. Currently the mapping is as follows:
Vendor ID | Google Consent Type | Description |
s1, s1498 | ad_storage | Will enable/disable advertising cookies |
s26 | analytics_storage | Will enable/disable analytics cookies. |
More Information
More Information can be found here:
- https://support.google.com/analytics/answer/9976101
- https://developers.google.com/gtagjs/devguide/consent