I'm trying to achieve the following:
- One GTM container for multiple websites/domains (within the same platform)
- Only fire tags that are active for the current website (by checking configured analytics / criteo / adwords / other vendor account id in data layer)
- Configure triggers like 'booking page reached' and 'booking created' once (by custom event and using data layer)
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:
- Is there a way to combine multiple triggers (AND instead of OR)
- Can I create an exception for tag that is not depended on the same event as the original trigger?
- Am I looking for a solution in the wrong direction? How do I prevent triggering a tag that is disabled (by dataLayer), without duplicating 'custom events' logic for every different tag / vendor.
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.