Info
Content

Working with Google Consent Mode

If enabled, the CMP will send additional consent information to GTM, Google Ads and Google Analytics.

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:

When using Google Analytics or Ads within the website, the CMP can directly communicate with the Google Consent Mode. You need to enable Consent Mode as described above and MUST set the default state as described below.

Changing default settings for Google Consent Mode

Although the CMP will automatically set the default status for gtag to denied, it is necessary to set the status manually in your Google Analytics code in order to ensure that the Consent Mode is enabled before Google Analytics starts. This is done by adding the following lines into your Analytics code:

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

gtag('consent', 'default', {
  'ad_storage': 'denied',
  'analytics_storage': 'denied'
});

dataLayer.push({
  'event': 'default_consent'
});

GTM also offers the possibility to work with Consent Mode in order to protect tags from triggering. In order to use this feature you can use our GTM Template and or you can manually implement the CMP into the page or the tag manager.

In order to enable the Consent Mode in GTM please follow these steps:

  1. Login to your account and click on Admin > Container Settings

  2. Check the box "Enable consent overview" and press Save

  3. Once enabled, you will find a shield icon under Tags which will show you which Consent Mode settings are applied to which tag:



  4. Update every tag for which you want to use Consent Mode (e.g. Google Analytics, Google Ads and so on), click on Advanced Settings > Consent Settings and set it to "Require additional consent for tag to fire". Add the Consent Mode names that are required for the tag, e.g. analytics_storage or ad_storage.

Once the Google Consent Mode is activated, the CMP will automatically send the consent information granted or denied to gtag/GTM. 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.
every other vendor cmp_[vendorid] Will enable/disable the vendor (e.g. cmp_s123 for vendor 123)
every purpose cmp_purpose_[purposeid] Will enable/disable the purpose (e.g. cmp_purpose_5 for purpose 5)

More Information

More Information can be found here:

 

Back to top