
JOXI FULL PAGE SCREEN CAPTURE PLUS
If the tag already has triggers, then clicking the blue plus symbol lets you add new triggers to the tag. If the tag has no triggers, then clicking the big empty space with “Choose a trigger to make this tag fire…” will open the trigger selector. In the tag workflow, you can enter the trigger selection screen in three different ways: There are two obvious paths to creating triggers: 1) through the tag workflow, and 2) via the Triggers menu.īoth paths take you essentially through the same steps. This makes for a very economical but still extremely robust setup for your auto-event triggers. Thus, the gtm.triggers key tells our tags that only the trigger where “Check Validation” was OFF (id 27) is allowed to fire. I then clicked a link where I had prevented the default action of the click with event.preventDefault(). So in this particular example, I had two Link Click triggers firing on the page, and one of them had “Check Validation” ON. The value of the key is containerID_triggerID. Since there’s just one listener controlling the firing of your tags, GTM leverages the gtm.triggers key in the auto-event object to specify which trigger should fire upon the event: This means that the first one only fires if the default action of the link click has not been prevented by other scripts, and the latter fires regardless. This is fine in most cases, but it’s also possible that you have two Link Click triggers, where on one you have “Check Validation” set to ON, and on the other it’s OFF.


gtm.linkClick, are evaluated when the event occurs. Rather, all the triggers that use the same auto-event, e.g. It doesn’t mean that GTM always attaches a new event listener to the document node, because that would be an exercise in redundancy. Since there’s no longer a listener tag that you work with, it’s more than possible that you can have many link click triggers, for example, activating tags on the same page. One thing that has changed is how multiple triggers of same type on the same page are handled. If there’s an ‘event’ key in the message, the instance gets the name of the event (unless it’s one of the three default GTM events, see below) or just “Message” if there’s no ‘event’ key in the command: If a push() command doesn’t have an ‘event’ key, it becomes merely a “message” that’s added to the message bus. It’s not like I’ve reverse engineered the GTM container JavaScript library (well, not all of it), but there are some interesting things to consider when working with triggers.įirst of all, as I said above, triggers require a dataLayer.push() or a pre-container-snippet declaration to fire a tag. But the way that triggers have been integrated into the tag workflow, without compromising any of the features carried over from rules, is a wonderful display of design skill. There’s a learning curve, and I know that improvements are made to the UI constantly. As a GTM fanboy, my honest and utterly biased opinion is that the improvements are amazing. These are, in my view, the biggest changes. This is incredibly convenient, since it reduces clutter in your tags, and it makes event tracking a very central part of any tagging setup (as it should be). Of course, to understand what “fire” means, you will need to do some exploration, but the question sets the scene: a tag needs a trigger to fire. Just the simple, quite self-explanatory question. There’s actually a question there now: What triggers this tag to fire? Nothing about firing rules or blocking rules, nothing about event conditions, and so forth. In the new UI, everything is about the workflow. It got even more confusing once you started learning about stuff like implicit events and conditions, and it didn’t help that the UI gave very little hints about what to do next. This was partly due to the fact that it wasn’t clear just what firing rules and blocking rules do. In the previous version of Google Tag Manager, the entry-level for beginners was quite high.

Sure, this is more a cosmetic thing, but it’s significant. I) Triggers are integrated into the workflow

There are three major changes, in my opinion, to how triggers compare with the rules of the previous GTM version. Subscribe to the Simmer newsletter to get the latest news and content from Simo Ahava into your email inbox!
JOXI FULL PAGE SCREEN CAPTURE FREE
II) You don’t need to explicitly state the ‘event’ conditionĪs always, feel free to add your thoughts in the comments after this post, if there’s some aspect of triggers that wasn’t adequately covered.I) Triggers are integrated into the workflow.
