-
Measuring Duration of jQuery 'Modal' Opens with GA4 and GTM
Hey there, need a little help understanding how to track how long a user has a modal window open using Google Analytics and Google Tag Manager. I’m working with a non-Analytics Universal setup, so I’m guessing using GTM events is the best way to go.
I notice there’s a “Timer” activator, but I’m a bit lost on how to put it to work. I reckon I can fire it up using
Percent Visible
(to know when the window’s open) andClick Classes
(to keep an eye on the popup element), so it sends a ping every, say, XXX seconds. But the question is, how do I calculate the total time? And what TAG should I be using?— Just a bit more info —
I’m using a jQuery modal. So it’s pretty simple, it’s just a hidden DIV that appears when a button gets pressed. If someone clicks outside the modal, or hit the close button, the DIV goes back into hiding. Because of this, I figure I can use
Percent Visible
that sends a ping every XXX seconds as long as the % visible is higher than 0.Thanks in advance!
===
Log in to reply.