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.
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.