#GTMtips: Setting Google Analytics Fields in GTM

Due to a recent change in the UI (see entry for February 12, 2015 in the release notes), the large and ever-expanding group of fields you could set for your Universal Analytics tags has been mostly removed. Instead, the often obscure Fields to Set selection has been promoted to the top of More Settings, and you control most of the Universal Analytics fields through this selector. In this #GTMtips, we’ll take a quick look at what’s changed, how it’s changed, and how to work with this new, slimmed-down tag template. Read More…

#GTMtips: Track File Downloads in GTM V2

In this #GTMtips post, we’ll go over a simple method for tracking file downloads in Google Tag Manager, specifically the new, V2 interface. Also, “tracking file downloads” means sending Events to Google Analytics, so this is a GA for GTM guide as well. Tip 15: Set up file download tracking in GTM Since we’re using Google Analytics as the tracking platform, we’ll need the following ingredients to make this setup work: Read More…

#GTMtips: Track Outbound Links in GTM V2

NOTE 30 Oct 2019: I’ve published a new article on outbound link tracking in Google Tag Manager, which makes the whole process much, MUCH simpler. I strongly recommend you read that article instead. Tracking outbound links is important for many. Identifying the exit paths is almost as important as tracking entrances. In this simple #GTMtips post, I’ll show you how to track outbound links with a simple Trigger + Auto-Event Variable combination in the new Google Tag Manager interface. Read More…

#GTMtips: Create a Generic Event Tag

With Google Tag Manager, there are a million different ways to make your tagging setup leaner and more flexible. The reason this should be a priority is because the UI isn’t perfect. The more tags you have, the more difficult it becomes to manage your assets. In this #GTMtips post, I show you one of my favorite ways to put your container on a diet. Tip 13: How to create a Generic Event Tag I’ve seen a lot of containers that suffer from the same problem. Read More…

#GTMTips: Add Konami Code to Your Site

You’ve probably heard of the Konami Code. It’s a cheat code in many Konami games, where the cheat is executed with a sequence of key presses on the keyboard. Since then, it’s become one of the staples of video game folk lore, and many websites, games, and applications have their own easter eggs activated with the Konami code. The sequence of keys is: up, up, down, down, left, right, left, right, B, A Read More…

#GTMTips: Prevent Repeat Transactions

In this tip, we’ll take a look at how to leverage a custom first-party cookie to prevent repeat hits of any kind. This is most useful for transactions, since a common problem with Google Analytics (traditional) eCommerce tracking is that a transaction hit is sent again upon subsequent entries to the receipt page, for example using the Back button of the browser. In some cases, and this is not a good practice, a receipt e-mail is sent to the user with a link back to the receipt page, where the transaction is sent over and over again upon entry. Read More…

#GTMtips: Fix Problems With GTM Listeners

I’ve written about this before here and here, but this issue remains probably the biggest problem users have when implementing Google Tag Manager. Tip 10: Resolve conflicts with GTM’s listeners The tip title is actually wrong. You’re not fixing Google Tag Manager listeners. Rather, you’re resolving conflicts that other scripts on your page might introduce. GTM’s event listening is based on something called event delegation. Event delegation makes use of the document object model (DOM) and its tree-like hierarchy. Read More…

#GTMtips: Migrate Containers to New UI

If you haven’t lived in a barrel, you should know by now that a new version of Google Tag Manager has been released. You can find the new version at http://tagmanager.google.com/, and there’s already a bunch of good articles about the new UI out there. I want to point out two: “Setting up GA via GTM’s new UX” by Krista Seiden, and “Google Tag Manager Refresh – 6 Things You Need to Know” by Jonathan Weber from Bounteous. Read More…

#GTMtips: Once UserId, Always UserId

The User ID is definitely one of the coolest things about Universal Analytics, if used correctly. It might reveal some surprising insights about your visitors, since now you’re not restricted to analysing visitors as just browser or device instances as before, but rather you can build your stories around all the touch points the user might have had on their journey to and through your web properties. With this simple tip, you can extend User ID tracking to return users without them needing to authenticate. Read More…

#GTMtips: DataLayer Declaration vs. .Push()

Here’s a tip on how to avoid a horrible, horrible mistake with Google Tag Manager. Tip 7: Always use .push() with dataLayer When you assign a value to a variable using the equals ( = ) sign, you are actually reallocating the variable to a new value, and the garbage collection system of the runtime environment sweeps the previous value to bit heaven. Let’s put it simply: if you redefine dataLayer after the GTM container snippet, you will break GTM’s proprietary functions. Read More…