<video id="demo" width=720 height=300 controls><source src="video.mp4" type="video/mp4">Video not supported by your browser.</video>
var v = document.querySelector('#hero-video');​// PAUSEv.addEventListener('pause', function() {UST.addTag('video_paused');// You can also add another tag with the exact time at which the video was pausedUST.addTag('video_paused_at_' + Math.round(v.currentTime));});​// PLAYv.addEventListener('play', function() {UST.addTag('video_play');});​// ENDEDv.addEventListener('ended', function() {UST.addTag('video_end');});
Recorded users will then have tags similar to those:
// Add a tag for users who scroll at least once on the homepagewindow.addEventListener('scroll', function didScroll() {UST.addTag('scrolled_on_home');window.removeEventListener('scroll', didScroll); // Sending it once is enough, remove listener});
Recorded users will then have tags similar to this: