Via the Sirdata CMP

The first and simplest way to activate Google's Advanced Consent Mode is also the easiest.

Simply log in to your Sirdata CMP account and go to the configuration section.

Click on the edit icon of your CMP, or the one installed on the relevant site if you have multiple (button located on the right in your configuration table), then select "Edit Add-ons":

Move the slider for the "Activation of Google Consent Mode" option to the right :

Click on

The integration of Consent Mode via this option is a universal integration in which the default signals are:

  • ad_storage='denied'

  • analytics_storage='denied'

  • functionality_storage='denied'

  • personalization_storage='denied'

  • security_storage='denied'

After the user's consent, an update signal 'granted' is sent for the concerned signals.

In case of withdrawal of consent, an update signal 'denied' is sent for the concerned signals.

In all cases, the tags will wait for a choice signal sent by the CMP for 1 second before triggering any potential cookie-based or cookieless pings (command 'wait_for_update: 1000').

Please visit the official Google Consent Mode page for more information

If you wish to manage this default behavior and/or the update behavior differently, refer to the "Activation via Google Tag Manager" section.

3) Conditioning Google Tags

To activate the Basic Google Consent Mode, you need to condition your Google scripts.

Example for Google Adsense :

Tag before conditioning
<script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Tag modified with conditioning
script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

Example for Google Analytics:

Tag before conditioning
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-XXXXXXXXXX');
    </script>
Tag modified with conditioning
<script async 
  data-cmp-src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"
  data-cmp-extravendor="8"
  data-cmp-purposes="1,8,9"
  data-cmp-purposes-li="10">

</script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-XXXXXXXXXX');
    </script>

Dernière mise à jour

Cet article vous a-t-il été utile ?