How Cookiebot integrates with Google Consent Mode

Read Time:2 Minute, 43 Second

Cookiebot integrates with Google Consent Mode. Don’t have a Cookiebot account yet? Sign up for your free trial today to take advantage of our powerful integration!

With Cookiebot’s integration to the Google Consent Mode you can respect the privacy choices of end users with minimal impact on your website’s ad-based revenue stream, analytics and more. 

If you’re already using Google gtag.js or Google Tag Manager (GTM) on your website, we recommend that you add the Google Consent Mode integration to your website, to ensure you get the best use of your Google Services.

The configuration described in this guide works with the following Google tags deployed via gtag.js and ‘Web’ containers in Google Tag Manager:

  • Google Ads (Google Ads Conversion Tracking and Remarketing)
  • Floodlight
  • Google Analytics
  • Conversion Linker

Benefits

Once you have implemented the integration on your website, Cookiebot will automatically signal the consent choices of your visitors to Google instead of blocking tags when not consented. The end user’s granular consent will be used by Google to adjust tag behaviour accordingly. This means for instance serving personalized ads to visitors that have opt’ed in to marketing cookies and tracking, or instead serving general interest ads relating to the content of your website when an “opt-out” is signaled. 

Without the integration, no ads will typically be served, as the scripts serving the ads will not be allowed to run without consent for marketing cookies. With the Google Consent Mode and the Cookiebot integration in place, Cookiebot will allow tags to run and Google will act to serve ads and log analytics data according to the signal sent by Cookiebot. 

Google describes the technical details of how supported tags changes behaviour based on the end user’s consent here: https://support.google.com/analytics/answer/9976101

Implementation

The Google Consent Mode is an API that Cookiebot integrates with. when you have installed the Cookiebot tag on your site (directly or via the GTM Template Gallery), you can enable the Google Consent API-integration by adding the following code snippet to your website template, above the gtag.js or GTM code itself: 

<script data-cookieconsent="ignore">

window.dataLayer = window.dataLayer || [];

function gtag() {

dataLayer.push(arguments);

}

gtag("consent", "default", {

ad_storage: "denied",

analytics_storage: "denied",

wait_for_update: 500,

});

gtag("set", "ads_data_redaction", true);

</script>

Make sure to add the above code before your gtag.js or GTM code snippet, and if you’ve chosen to rename the dataLayer, ensure that you change window.dataLayer to the actual name of the dataLayer.

Google’s API documentation suggests further steps to enable an integration, but as these are automatically handled by Cookiebot, nothing else is needed. You may change the values of ad_storage and analytics_storage to ‘granted’ and set ads_data_redaction to ‘false’ if you want to default to an opt-in before the end user has submitted consent, for example allowing for a default opt-in under CCPA.

If you are using Cookiebot with Google Tag Manager today, you must remove any applied cookie consent triggers from Google tags that support Consent Mode (as listed above) and add a different trigger like “All pages”.

 

Source: https://support.cookiebot.com/hc/en-us/articles/360016047000-Cookiebot-and-Google-Consent-Mode

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *