Search
Close this search box.

Documentation

In this article

Consent Mode

You can now enable Google Consent Mode for Tag Manager. How it works, and what you need to configure can be found here.

Download

You can also directly download the demo container with triggers and variables/ Please make sure you know how to import a container.

In this category

Categories

Recent articles

Consent Mode for 7.0

Possible configurations

Below you will find the possible configurations for Consent Mode. It might be possible to use Consent Mode while you’re using another plugin to add Google Tags, but these are not supported by default and you should verify it as explained below.

When you’re using Site Kit with Complianz, you can only use Advanced Consent Mode, this is where the Google Tags are loaded directly, and use a tracking mechanism based on consent preferences. 

Under Complianz -> Wizard -> Statistics, indicate that you’re using Google Analytics (Yes, with Google Analytics).

 

Configuring for a Google tag is rather straight forward in Complianz. You only need to enable Consent Mode and decide if you want to use particular parameters to be set before you can add manual configurations. If you want to consent mode for Google tag with Complianz, you’re required to fill in your GA4 tag ID. Your configuration of Complianz will set the default consent state, and updates accordingly.

1. Blocking Google Tags

The question “Do you want to block all Google Tags before consent?” is default set to “No”, or configured in Advanced Mode. This means the Google Tags will be released on page load and depending on the consent states pushed through the layer will adapt its tracking mechanism accordingly. For example, on pageload a Google Tag will be set to use parameters only, without cookies. It will still connect to the Google servers.

If you block Google Tags before consent, Consent Mode will work after consent only. This is the non-hybrid, or ‘basic’ model of Consent Mode.

2. What is url_passthrough?

When a user lands on your website after clicking an ad, information about the ad may be appended to your landing page URLs as a query parameter. In order to improve conversion accuracy, this information is usually stored in first-party cookies on your domain.

However, if ad_storage is set to denied, this information will not be stored locally. Read more

2. What is ads_data_redaction?

When ads_data_redaction is true and ad_storage is denied, ad click identifiers sent in network requests by Google Ads and Floodlight tags will be redacted. Network requests will also be sent through a cookieless domain.

3. Adding Google Tags

You’re required to at least use one Google Tag, under statistics to enable Consent Mode. Other tags are optional and are split between Statistics and Marketing categories.

The additonal tag field can be used with a variety of tags, comma separated for example.

You can configure Google Tag Manager and Consent Mode by using our GTM template. First, configure Tag Manager in Complianz by indicating “Yes, with Google Tag Manager” under Wizard -> Consent -> Statistics, and then configuring the relevant questions for Consent Mode and entering your GTM Container ID.

Downloading the template

Now you can proceed directly with implementing the Complianz template, directly in Google Tag Manager. This template is available in the community gallery.


You can find it by going to “Templates” in your GTM dashboard, and under “Tag Templates” search for “Complianz”.

Fire the template as a “Tag” in your workspace as shown below. It should be triggered by Consent Initialization – All Pages, so that it fires before other tags.

Configuring the template (Optional)

The fastest way is to edit the tag and implement the default options. Complianz will figure out how your configuration should react to the defaultConsent state.

If you click the pencil to edit the Tag, continue with Add Row. You will see below options:

 

Blocking Google Tags?

Consent Mode in Tag Manager is default set to Advanced Mode.

This means the Google Tags will be released on page load and depending on the consent states pushed through the layer will adapt its tracking mechanism accordingly. For example, on pageload a Google Tag will be set to use parameters only, without cookies. It will still connect to the Google servers.

If you block Google Tags before consent, Consent Mode will work after consent only. This is the non-hybrid, or ‘basic’ model of Consent Mode and be achieved by using the Complianz default Tag Manager events, described here.

Options

This is what it means – We see the default, and preferred set-up for Complianz.

Region: Here you can differentiate between different regions. For Complianz this isn’t necessary as this is done automatically. Leave empty for best results.

Preferences, Analytics and Advertising: These are the categories that are denied before consent. Complianz grants functional and security related services by default. You can change the defaults here.

Redact Ads Data and Enable URL passthrough: These are parameters to add functionality based on consent parameters. For in-depth information read more on Google.com. Only use this feature if you’re using advertising services from Google and know what it does.

If you know about another implementation, or have a plugin that works out-of-the-box, please let us know so we can add it to our documentation.

Verifying Consent Mode

Verifying that Consent Mode is working should be done in the browser, as you’re not able to measure if consent mode is working from your Analytics dashboard, as the type of Consent Mode en mechanism of modelling might differ.

1. Check datalayer log

With everything enabled you can use below javascript to log your datalayer directly in the browser. Paste it in your browser console, under message and hit enter. Make sure you have loaded your website in incognito, without interacting with the banner. (Deprecated)

Focus on the lines below, you will find the Google Tags affected by Consent Mode. And both the default and updated consent state. This example is from the GDPR region.

				
					{"consent","default",{"security_storage":"granted","functionality_storage":"granted","personalization_storage":"denied","analytics_storage":"denied","ad_storage":"denied"}}
{"config","GT-5MRHCNL"}
{"config","AW-384290054"}
{"consent","update",{"security_storage":"granted","functionality_storage":"granted","personalization_storage":"granted","analytics_storage":"granted","ad_storage":"granted"}}

				
			

The last 2 lines should reflect the way you have configured Complianz to act before consent. If you now interact with the consent banner, and for example accept all categories you would see this after logging the datalayer again. The last 2 lines afterward should reflect:

				
					{"consent","update",{"security_storage":"granted","functionality_storage":"granted","personalization_storage":"granted","analytics_storage":"granted","ad_storage":"granted"}}
				
			

2. Check network request parameters

If you have done the above and have granted full consent you should find the network requests of your Google Tags in your browser, under network and check for parameters. Go to your browser console – network – (reload your website if needed) – filter on collect?v= and select the URL, you will something similar to:

				
					https://region1.google-analytics.com/g/collect?v=2&tid=G-LGQ705GW2J&gtm=45Pe39i0&_p=828970855&gcs=G111&gdid=......
				
			

You can continue under the tab payload and look for the parameter gcs, but in the above example your will quickly see gcs=G111. Depending on your input you should find the following parameters, in the above example G111 means full consent.

Parameter Category Cookies Data Collection on Consent
Default State G100 Functional, Preferences Cookieless pings will be sent to Google Analytics for basic measurement and modeling purposes(2) Anonymous Data (1)
Updated State G101 Statistics Yes Based on settings in Google Analytics
Updated State G111 Optional Yes Not Limited

Join 800.000 users and install The Privacy Suite for WordPress locally, automated or fully customised, and access our awesome support if you need any help!