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

Using exceptions in Tag Manager based on consent status

In our article, The Definitive Guide to Tag Manager, we explained how to use custom events to trigger your tags based on the categories on your banner. In some cases, you want to trigger your tags based on other custom events, besides the consent event.

For this, we suggested Trigger Groups, but due to a recent change, this setting doesn’t seem to be reliable when the events are not compatible.

Using 1st Party cookie variables as an exception

For a more reliable approach, you can use custom events as an exception, based on 1st party cookies by Complianz. The below table will show the available cookies, and values that can be used to create exceptions on the trigger rules. Making for more fine-grained control of executing your tags on consent.

Cookie Allowed Denied
cmplz_consent_status allow deny
cmplz_choice set *not available as cookie
This cookie is set by default based on your region’s consent management before the user makes a choice. For opt-in it will be set to ‘deny’, for opt-out this will be ‘allow’. You can use this cookie to configure tags before a user’s choice.
CookiesAllowedDenied
cmplz_functionalallowdeny
cmplz_preferencesallowdeny
cmplz_statisticsallowdeny
cmplz_statistics-anonymousallowdeny
cmplz_marketingallowdeny

 

Example 1: Using a custom variable on an existing trigger.

Sometimes a trigger is an event at the same time and can only be used with an exception. For example “Scroll depth.” This is how you can only use Scroll Depth as a metric when consent status allows “Statistics” as a category.

In Tag Manager create a new variable, under Variables.

Create the 1st Party cookie variable

Choose the cookie name from the table above, for this instance we will use cmplz_event_0

Append it to the Scroll Depth trigger

Fire this trigger when all the above events are available, including the cmplz_event_0 cookie, which value should equal or contain allow.

Example 2: Using an exception based on a variable.

Sometimes you will need an exception based on the value being equal to “deny”.  In logical terms. Trigger A, except when Statistics is set to Deny. In this case, a trigger will work for every pageview except when the user explicitly has opt-ed out to the category “Statistics”

Create a custom event based on the cookie variable

It is still a 1st party cookie variable, but this time the value is set to deny.

Use the trigger as an exception

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!