Skip to main content
All CollectionsGetting Started
How to install Consent Studio on Google Tag Manager
How to install Consent Studio on Google Tag Manager

Support Google Consent Mode v2 through Google Tag Manager with Consent Studio

J
Written by Juul van Schayik
Updated over a month ago

Follow these steps to install the Consent Studio Consent Management Platform on Google Tag Manager

After completing the following steps, you will have a Google Tag Manager container set-up with Consent Overview enabled and have the Consent Studio CMP installed with basic settings.

1. Prepare you Google Tag Manager container

Have a GTM Container ready

First things first: you need to have set-up a Google Tag Manager container and installed it on your website. This article from the official Google documentation will help you do this.

Good to know: For WordPress websites, Google has the Google Site Kit plugin available that helps you to easily install Google Tag Manager on your WordPress website β€” without the need to code.

Enable Consent Overview

The Consent Overview page provides a high level view of all the consent settings across the tags in your container and helps you adjust them for individual tags.

Consent Overview is not enabled by default on your Google Tag Manager container. Enable it using these instructions from the official Google documentation.

2. Installation of Consent Studio

Log in at https://consent.studio. If you do not yet have an account, you can create one here.

After having registered your site for our free trial, you will find that the configuration of your site is order in a specific flow of steps. These are navigable from every main configuration component in your dashboard, using the buttons with the arrow icons.

Open the Cookie Banner page under Settings and scroll to the Installation section

Add our Google Tag Manager tag template (Consent Studio CMP) from the Template Gallery to the GTM container that is active on the domain that you have registered with Consent Studio.

When you have added the template to the relevant GTM container, open the Tags tab, click New and add the Consent Studio CMP tag to the Tag Manager container. The trigger must be Consent Initialization - All Pages.


Google Consent Mode v2

Trigger for the "Consent Studio CMP" tag

Google Consent Mode v2 is best supported when installing our tag for Google Tag Manager. For this to work properly, please use the β€œConsent Initialization - All Pages” trigger for the official Google Tag Manager tag.

Basic and advanced consent mode

Implementing Consent Mode v2 can be divided in two approaches:

  • Basic

  • Advanced

With the basic approach, you will block specific tags until a consent update allows them to load. You can achieve this with the cookie_consent_update event (or one of our specific events) that ships with Consent Studio.

With the advanced approach, you will load them nevertheless. However, the tags will adapt to the actual consent states and change their behavior accordingly. You can then use the All Pages trigger that is available in Google Tag Manager.

How to set-up basic consent mode

As the basic approach of consent mode entails that tags are not loaded at all until consent has been provided for a specific category, we will leverage the built in dataLayer events of Consent Studio to achieve this.

  • For tags that you only want to load when consent has been provided for the "functional" consent category, the event that you may use is called cookie_consent_granted_functional;

  • For tags that you only want to load when consent has been provided for the "analytics" consent category, the event that you may use is called cookie_consent_granted_analytics.

  • For tags that you only want to load when consent has been provided for the "marketing" consent category, the event that you may use is called cookie_consent_granted_marketing.

To create a new custom event trigger (cited from Google's documentation):

  1. Open the Triggers panel in your Google Tag Manager container and click New.

  2. Click Trigger Configuration and choose the Custom Event trigger type.

  3. Enter an event name. This should be any of the event names provided above.



How to set-up advanced consent mode

Implementing advanced consent mode is, ironically, simpler, as you will load tags as you normally should β€” based on the trigger that best suits your use case. This could be the All Pages trigger, for instance.

Note that not every tag that you install in your Tag Manager container may respect the consent signals provided by Consent Studio through Google Consent Mode. If you are unsure, it might be best to use basic consent mode for these tags and not load them at all until consent has been provided by the visitor for the specific tag.

You can trust that official tags that are maintained by Google, such as Conversion Linker, the Google Tag and Google Analytics adapt to consent signals properly.

Did this answer your question?