Nextwinz Site logo 1

How to Install Google Consent Mode V2 Step by Step Guide

Consent Mode

Share This Post

Google has recently mandated the adoption of Consent Mode version 2 for integrating advertising functionalities across various Google products through consent management platforms. This tutorial aims to guide you through the process of installing Consent Mode v2 using Cookiebot alongside Google Tag Manager. 

From establishing consent banners to configuring trigger mechanisms based on user consent for GTM tags, this comprehensive walkthrough ensures a seamless integration process.

Cookiebot Setup Guide:

At first, search on google “Cookiebot” website by


Google consent 1

If you’re looking for a consent management platform with Google Consent Mode features, Cookiebot is one option among many. They provide a generous 14-day free trial and also offer a free plan for a single domain website with up to 50 subpages.

Go to PricingStart your free trial to get started.

Once you have signed up, go to the Domains section and input the domain name of your website where you want to enable cookie consent.


Google consent 2

Afterward, proceed to the Configuration section to customize the consent banner that you wish to display on your website.


Screenshot 2


Here is our cookie consent banner.


Google consent 4


Because my website requires a login, I added the cookies and trackers manually. But for most websites, you’d simply scan your site, and the tool would automatically detect the cookies and trackers.

Check out our How to Create a GTM

Finally, our website has Google Tag Manager installed. Currently, we have four tags running that we want to place under the Consent Management Platform and consent mode.


Google consent 5

How to Install Consent Mode V2 in Google Tag Manager

In our Tags section, click New.

Screenshot 5


Select the Tag Configuration and open the Community Template Gallery.


Google consent 7


Search for Cookiebot and select the Cookiebot CMP tag template.


Google consent 8

Click Add to Workspace. Confirm by clicking Add.


Google consent 8.

Next, we require the Cookiebot ID, which can be obtained from Cookiebot in the Implementation section. Simply copy the Cookiebot ID from there.


Google consent9

Paste the Cookiebot ID in the allocated spot and click Enable Google Consent Mode.


Google consent10

Activating this option will establish the connection between our consent banner, Google Tag Manager, the data layer, and the Gtag utilizing the Consent Management API. This ensures that all the necessary calls are automatically set up.

Once you’ve enabled Google consent mode, all that remains is to select our default consent state. What should our state be when the consent popup loads, before any tags are triggered?

You have the option to set different consent states for various regions or apply a single default state globally.

To do this, click on “Add region.” Then, leave the region field empty and ensure all default states are set to “Denied.” Finally, click on “Add” to save this default consent state.


Google consent11


Let’s add a name to the tag and add a trigger by clicking Triggering.


Google consent12

We’ll use the Consent Initialization – All Pages trigger because we want this tag to fire before any other tags.


Google consent mode 1

Save the tag and enter the Preview mode.

Google consent mode 14

Put in your website’s domain and connect the Tag Assistant to your site. Your website will open in another tab.

Install This Extension: Tag Assistant

Here we go! We get our consent popup where we can choose the different cookie categories we can allow or deny. Click Allow All.


Google consent mode 15

Let’s examine the Tag Assistant at this point. We’ll observe various calls present.

One of these is the initial Consent event, which includes the consent calls made to the Gtag via the consent mode API.

All our other tags fire at an earlier event, the Container Loaded event.


Google consent mode 16

Google consent mode 17

We must update the triggers of our tags to ensure they activate once the user has made their consent selection. Utilizing the consent mode, we can link GTM to these consent calls through the consent overview.


Connecting GTM Tags to the Consent Management Platform

Inside Google Tag Manager, go to AdminContainer Settings.

Google consent mode 18

Under additional settings, enable Consent Overview.


Google consent mode 19

Now, we can utilize specific triggers, similar to new triggers, and attach them to the tags.

In the Tags section, click on the “New” button next to “New,” which will open the consent overview.


Google consent mode 20

Here, you will see which tags have the new configuration of the consent overview applied to them, and currently, none of our tags have this configuration applied yet.


Google consent mode 21

Google consent mode 1


Full Video Tutorial:

How to Install Google Consent Mode V2


Final Summary

So, those are the steps for installing consent mode v2. Initially, we covered the Cookiebot setup and how to set up your consent banner on your website.

Next, we learned how to implement the basic mode, where we prevent tags from firing based on the user’s selection. Finally, we utilized the advanced mode to send cookie-less pings when the user denies consent.

However you choose to implement it, it’s crucial to thoroughly test your setup to ensure that it complies with the different consent settings provided by the user. Once you’re confident with your setup, publish your tags live, and you’re good to go!



More To Explore

Do You Want To Boost Your Business?

drop us a line and keep in touch

CTA post
Nextwinz Site logo
Send us Your Message