Google Consent Mode is designed to maintain compliance with privacy regulations like the GDPR while getting the most out of your data.
This guide will help you identify and resolve the most common configuration issues for Google Consent Mode.
1. Google Scripts load before consent #
Why does this issue happen?
It usually is because you are loading Google Tags before our banner can initialise. Meaning that the Google tags that run do not receive the Consent Mode default setting in time resulting in that the Google tags run and set cookies before acceptance of the user.
How to fix it?
1.1 Manual implementation #
If you are adding the cookie banner embed code directly in the <head> of the website you need to make sure that the script is placed above any Google scripts.
Identify Google scripts by looking at your code and make sure that the cookie banner embed script is placed above any gtag.js and googletagmanager.com scripts.
Example of incorrect placement of scripts
<!-- WRONG: Google Analytics script placed BEFORE CookieFirst -->
<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>
<!-- CookieFirst placed AFTER Google scripts -->
<script src="https://consent.cookiefirst.com/sites/domain.com-your-site-uuid/consent.js"></script>
It can also be that you migrated to Google Tag Manager but are still running Google Tags in your website that you forgot to move to Tagmanager or forgot to move after migrating to GTM. In either case you need to make sure not loading these tags twice as that also corrupts your data.
1.2 Google Tag Manager #
if you are using our Google Tag Manager template there could still be old Google Tags running in your website, make sure to migrate them to Google Tag Manager and then remove them from the website.
A second issue we see quite a lot is that you didn’t attach the appropriate trigger to the CookieFirst Tag. It should be always “Consent Initialisation – All Pages” as this event fires before any other making sure our Defaults will be launched in time for the other Google Tags to pick them up.

2. Consent mode is disabled #
Why does this issue happen?
Even though we enable Google Consent Mode by default it might be that you changed implementation method or accidentally turned it off while configuring your website. Google Consent Mode can be implemented in multiple ways which we will elaborate on one by one.
How to fix disabled Consent Mode?
First you need to make sure that Google Consent Mode is enable in the CookieFirst settings. This makes sure that our banner sends Update events when a user consents through the cookie banner.

2.1 Set Google Consent Mode Defaults over Cookie banner #
If you are not using our Google Tag Manager template for loading the banner and have added the cookie embed code directly to your site ABOVE all Google Tags then you need to make sure that the default settings for Consent Mode have been enabled.
Make sure that you have at least set all the Consent Type settings to denied for the EU Region + UK. Depending on your own judgement you might want to set the defaults to granted for Non-EU Regions.

2.2 Set Google Consent Mode Defaults with Google Tag Manager #
If you want to use Google Tag Manager for setting up the defaults you need to make sure you install our GTM template from the Featured Community CMP Templates when adding a new tag to GTM.
Add the GTM template to your workspace and add the domain api key which can be found on your domain’s embed code section see below.

Now setup a region for the EU countries with Denied for all the consent types and add the EU + UK country list there.
AT, BE, BG, CY, CZ, DK, EE, FI, FR, DE, GR, HU, HR, IS, IE, IT, LV, LI, LT, LU, MT, NL, NO, PL, PT, RO, SK, SI, ES, SE, CH, GB
Next add trigger “Consent Initialisation – All Pages”

3. Some consents are granted by default #
This happens when you have consent types like analytics_storage or ad_storage for example set to Granted instead of Denied for users in the EEA + UK. Depending on your integration method make sure to set the defaults to denied for these countries.
Inside CookieFirst.

In Google Tag Manager

4. Consent Preference is sent before user makes a choice #
You need to make sure you’re not pre-executing any cookie categories before a user interacts with the cookie banner. So the settings below in the screenshot need to be turned off.

Need help? #
If you are still experiencing issues with Google Consent Mode after trying the resolutions mentioned in this article please send us an email.