
There might be use cases for the last option too, though. true view impression tracking, and tracking when multiple different elements appear can be used to create an advanced scroll trigger. Tracking if an element is visible is very useful for e.g. Of these, I wager the first two will be most used. In other words, this would be the setting to use if you wanted to create a trigger that fires when different parts of the page enter the viewport!Įvery time an element appears on-screen - this trigger fires whenever any matched element appears in the viewport, and will do so each time the element reappears. However, when using CSS selectors, this setting will fire once for each element matched by the selector(s). Once per element - this trigger will fire just once if an element with a specific ID appears in the viewport (even if multiple elements share the same ID, in which case it will fire just for the first one). Thus if you’ve specified multiple selectors or there are multiple elements with the same ID, this trigger setting will make the trigger fire only once - when the first matched element enters the viewport. The moment is when the first element that matches the ID or the selector string enters the viewport. Once per page - this trigger will only fire once on the current page. Is it a check to see if a certain element is in the viewport when the page is loaded, or is it an advanced scroll trigger? This is where you’ll govern what this trigger actually is.

The ID selector, on the other hand, performs better if you have only one element to track. The trigger could then fire when each one of these enters the viewport (see below). #header, h2.title, div.content, div.footer For example, if I want to track when the header, the article title, the article body, and the article footer enter the viewport, I could use something like this as the selector: The obvious difference between the two is that you can add multiple element selectors into the CSS selector string. ID - the trigger waits for an element with a specific id attribute to appear in the viewport.ĬSS Selector - the trigger waits for elements that match the CSS selector string to enter the viewport. They really make Google Tag Manager more than just the sum of its parts. At this point I really recommend you read up on CSS selectors (see also my article on the topic).
