How to track element visibility

I want to track element visibility, but I don’t know how to create this trigger using Tag Manager. Something like: if an element (link, CTA, image, etc) is on the user’s viewport by at least X%, it triggers an event.

I know that Tag Manager let’s me use element presence as a trigger, but this is not what I want, I need it to not just be present in the page, but actually visible in the viewport.

Right now I was only able to do this using Google Tag Manager. Is there anyway I can do it in Tag Manager?

Hi. Maybe taking a step back, what would you like to achieve by using this trigger? If it’s all about measuring the views of a particular content part, maybe content tracking would be a solution for you: How can I track interactions with popups and content? | Piwik PRO help center

I can’t use content interaction because I can’t add the attributes to the code without development help and right now that’s not possible. So I really need another way.

We don’t have any out of the box functionality for that in Tag Manager. The only solution is to write custom js code that would handle that.

Hi,

Maybe this article can help you to set something up using Mutation Observers when you translate it: Bedingte Element-Sichtbarkeit im Piwik PRO Tag Manager vermessen | 📊 Blog Markus Baersch

best,
Markus

1 Like