How do I know if I've already set up Google Consent Mode?

What do I need to change in order for things to continue working from the 24th of February?

What if I've changed my mind and don't want to enable Google Consent Mode?

If you became a client and set up your Cookie Information solution before the 24th of February 2021 AND you have previously set up Google Consent Mode then you will need to follow this article in order to ensure that Google Consent Mode functions correctly.

If you have not previously set up Google Consent Mode, then please follow our other article Implementing Google Consent Mode now that it is the default

How do I know if I've already set up Google Consent Mode?

You'll know that Google Consent Mode has been set up because you'll see the following script in the <head> tag of your website:

<!-- The initial config of Consent Mode -->
<script type="text/javascript">
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>

Your entire setup of Google Consent Mode will also look something similar to this:

<head>
<!-- The initial config of Consent Mode -->
<script type="text/javascript">
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>

<!-- Cookie Information Pop-up Script is required for the SDK -->
<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="EN" type="text/javascript"></script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TRACKING-ID"></script>
<script type="text/javascript">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'TRACKING-ID');
</script>

</head>
<body>

<!-- SDK for inline script that triggers Consent Mode on user consent -->
<script>
window.addEventListener('CookieInformationConsentGiven', function (event) {
if (CookieInformation.getConsentGivenFor('cookie_cat_statistic')) {
gtag('consent', 'update', {'analytics_storage': 'granted'});
console.log('GTAG Consent');
}
if (CookieInformation.getConsentGivenFor('cookie_cat_marketing')){
gtag('consent', 'update', {'ad_storage': 'granted'});
}
}, false);
</script>
</body>

What do I need to change in order for things to continue working properly?

If Google Analytics and Ads are managed via Google Tag Manager, you will need to go into your Google Tag Manager container and remove any Cookie Information triggers that are set on Google Analytics or Ads.

If Google Analytics and Ads are managed using a script placed on your website such as analytics.js, you will need to update your SDK implementation to reflect this by removing the code snippet contained in the section How to use the Cookie Control SDK to trigger the Consent Mode on consent, as this will now be taken care of by Consent Mode.

You will also need to remove the code snippet starting with <!-- SDK for inline script that triggers Consent Mode on user consent -->

You still need to keep the initial config of Google Consent Mode script in the <head> tag of your site placed above the uc.js (pop-up) script, and Google Tag Manager script, or gtag.js script.

What if I've changed my mind and don't want to enable Google Consent Mode after all?

If you'd like to disable Google consent Mode, please add the following attribute to the uc.js script:

data-gcm-enabled="false"


Did this answer your question?