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 |
Cookies | Allowed | Denied |
cmplz_functional | allow | deny |
cmplz_preferences | allow | deny |
cmplz_statistics | allow | deny |
cmplz_statistics-anonymous | allow | deny |
cmplz_marketing | allow | deny |
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.
![](https://harrisb-localhost.cookiedatabase.org/wp-content/uploads/2021/05/newvariable.png)
Create the 1st Party cookie variable
Choose the cookie name from the table above, for this instance we will use cmplz_event_0
![](https://harrisb-localhost.cookiedatabase.org/wp-content/uploads/2021/05/1stpartycookie.png)
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.
![](https://harrisb-localhost.cookiedatabase.org/wp-content/uploads/2021/05/trigger.png)
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.![](https://harrisb-localhost.cookiedatabase.org/wp-content/uploads/2021/05/Screenshot-2021-05-31-at-12.31.19.png)
Use the trigger as an exception
![](https://harrisb-localhost.cookiedatabase.org/wp-content/uploads/2021/05/Screenshot-2021-05-31-at-12.31.30.png)