The Privacy Suite for WordPress

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.   complianz_consent_status cmplz_event_0 cmplz_event_* cmplz_event_marketing







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.












These are set based on the user choice:

  • cmplz_event_0 is the first category after functional, you have configured for your banner.
  • cmplz_event_* based on how many categories you have added to your banner. For example: when using Functional, Statistics, Social, Marketing. Social will be cmplz_event_1.
  • cmplz_event_marketing is always the last category on the banner.

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

Recent articles

The Privacy Suite for WordPress
Get compliant today with the only Privacy Suite made for WordPress


Popular articles