Reputation: 436
I'm trying to achieve the following:
My problem is combining the condition 'active tag' (checking for account id) with a 'booking created' event without duplicating logic. Because every trigger is an OR condition, not an AND condition.
Currently, this results in creating exceptions that are very specific, and contain most of the triggers like 'Booking created', specific for a tag (Analytics / Criteo / Adwords). Resulting in having to still make very specific (duplicate) triggers, instead of re-using them. Main issue is exceptions have to match the event type of the trigger. And triggers cannot be combined nor extended.
My tags / triggers configuration looks like this now:
My questions:
Upvotes: 3
Views: 7351
Reputation: 91
There is a more powerful and easiest way to combine triggers in multiple AND and OR.
First of all: if you need to combine triggers with just OR condition, you can simply add a list of triggers when you are configuring a tag. I am no talking about exceptions, just triggers. You can click on the (+) symbol and every trigger you add is managed with OR condition.
But, if you need, for instance, to add two triggers in AND? There is a very simple way that does not imply the regex.
Is the trigger group feature. Here are the steps.
Finally, go to your tag and use the GROUP instead of the single trigger.
That's all
Upvotes: 4
Reputation: 32780
If your main problem is that "exceptions have to match the event type of the trigger", the common workaround is to use a trigger of the type "custom event", check "use regex" and enter ".*" (without the quotes), which matches all events, including the built-in pageview (gtm.js), DOM ready (gtm.dom) and Window loaded (gtm.load). Then add conditions as needed.
Upvotes: 3