Last updated 9 March 2018 with some new tips. The Scroll Depth trigger in Google Tag Manager has a lot going for it. Tracking how far users scroll down a given page has long since been recognized as an important cog in the engagement tracking machine, and there have been really great solutions for implementing scroll depth tracking for web analytics over the years. With Google Tag Manager’s native Scroll Depth trigger, it’s tempting to think we now have a be-all end-all solution that covers all the bases.
This is one of those #GTMTips posts that I was certain I’d already written. So it came as a mild surprise when I realized I’d never tackled this aspect of Google Tag Manager. It’s a short and sweet tip again. Today we’ll learn how to check if a variable is undefined using Google Tag Manager. Tip 73: Check for undefined variable values If a variable is undefined, it means that a variable with the given name does not currently have any valid value in memory.
Google Tag Manager should be relatively easy to implement. Just paste the container snippet to the <head> of the page and you’re good to go! However, at some point you’ll want to configure the dataLayer structure, too (read more about dataLayer here). There are two ways to do it: the right way and the wrong way. In this article, we’ll see what happens if you do it the wrong way, how to identify the issue, and how to fix it.
This is, by no means, a novel topic in this blog. I’ve covered Google Tag Manager’s event tracking and triggers numerous times before (see below). Auto-Event Tracking In GTM 2.0 #GTMtips: Track Outbound Links In GTM V2 #GTMtips: Fix Problems With GTM Listeners Trigger Guide For Google Tag Manager However, based on the number of queries we still see in the Google Tag Manager Product Forums about event tracking, I believe one particular aspect of GTM’s triggers invites revisiting.
Google Tag Manager has a Trigger type which fires after a certain duration of time has passed on the web page: the Timer Trigger. The most common uses for the Timer Trigger seem to be either to send an event to Google Analytics after X seconds of dwell time (to kill the Bounce), or to defer a Tag from firing until some asynchronous request has completed with certainty. In the previous version of Google Tag Manager, the Timer was a separate listener Tag, which meant that you could start a timer based on a user interaction such as a click.
Every now and then I run into a problem which needs some creativity to find a fix. When choosing a course of action, I tend to land first on an extremely complicated solution. However, if I’m patient enough, I manage to whittle it down to something far more manageable and efficient. In this #GTMTips post, I’ll show you one of these extremely simple solutions to a problem which you might normally overcomplicate.
There might be many reasons you’d want to fire a single Tag multiple times in Google Tag Manager. The most common one is when you want to deploy multiples of a single tracking point on the web. Perhaps you have a roll-up account you want to send the hits to, in addition to the site-specific tracking property. Quite a while ago, I gave a solution for this with a specific focus on Google Analytics Tags.
- OLDER POSTS
- page 1 of 2