#GTMTips: Remove PII From Google Analytics Hits

Sending personally identifiable information (PII) to Google Analytics is one of the things you should really avoid doing. For one, it’s against the terms of service of the platform, but also you will most likely be in violation of national, federal, or EU legislation drafted to protect the privacy of individuals online. In this #GTMTips post, I’ll show you a way to make sure that any tags you configure this solution with will not contain strings that might be construed as PII. Read More…

#GTMTips: Pagination and Quick Search

If you open the Google Tag Manager user interface and browser your tags, triggers, and variables, you might notice that the UI now has two new features: Pagination, where only 50 results are shown per page A quick search / filter bar at the top of each list, which lets you narrow the list down to results that match your query Pagination might be a nuisance in large containers, but it was implemented to improve performance. Read More…

#GTMTips: Create String From Multiple Object Properties

Facebook’s pixel has an attribute named content_ids (required for Dynamic Ads), which requires an Array of content IDs as its value. It’s very possible you’re running this pixel on a site which already has Enhanced Ecommerce for Universal Analytics implemented, and now you want to use the same Enhanced Ecommerce data that your developers have already made available in this Facebook pixel. Or perhaps you want to concatenate a list of strings, such as article tags (['culture', 'politics']), and send it as a comma-separated string to Google Analytics ('culture,politics'). Read More…

#GTMTips: Send Google Analytics Tag to Multiple Properties

Here we are again, revisiting an old theme. When using Google Tag Manager, we often want to send the contents of the same tag to multiple Universal Analytics properties. With on-page GA, this used to be quite simple, as all you had to do was create a new tracker and then just remember to run the ga('trackerName.send'...) commands to all the trackers (or you could use my duplicator plugin). With GTM, your options are more limited, since Google Tag Manager abstracts the tracker object, giving you far fewer tools to work with. Read More…

#GTMTips: Use CustomTask to Access Tracker Values in Google Tag Manager

One of the things I’ve recommended from the get-go is to always send the Client ID to Google Analytics with your users’ hits. This is very useful for adding a level of granularity to your tracking. At first, I recommended using an Event tag to do this. Then I modified my approach a little so that you could send it with your initial Page View (thus not inflating your hit counts). Read More…

#GTMTips: Enable and Fire Triggers in Google Tag Manager

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. Read More…

#GTMTips: User Permissions

In this #GTMTips article, we’ll take a look at user permissions and access control levels that Google Tag Manager lets you set today. Doing access control right from a user interface AND user experience perspective is really difficult, and GTM is no exception. Nevertheless, there are several levels of user control that you can modify from account and container settings, and it’s useful to familiarize with these so that managing a big, sprawling account hierarchy would be just a bit easier. Read More…

#GTMTips: Cross-Domain Tracking With Multiple GA Trackers

To be fair, this tip isn’t just for Google Tag Manager but for regular old on-page Google Analytics as well. It’s one of those little things that’s corroding your data quality without you ever realizing it. Namely, this tip is about how to handle cross-domain tracking in situations where you are sending data to multiple Google Analytics properties on the same page. It’s a very typical scenario - you have a “local” property, which tracks only the traffic of the current site, and then a “rollup” property, where you send data from all your organization’s websites. Read More…

#GTMTips: Test Against Multiple URLs in Your Triggers

The beauty of #GTMTips, at least how I’ve envisioned them, is that they can be really simple or crazy complex. The important thing is that the idea is conveyed clearly enough. That’s why so many of these tips have originated from discussions in our Google Tag Manager Google+ community, the Product Forums, and in private email correspondence with people asking for help. Today’s tip, for example, originated from a back-and-forth with Süleyman Okan, so thank you for the inspiration! Read More…

#GTMTips: 10 Useful Custom JavaScript Tricks

I recently published a #GTMTips guide called 10 Useful CSS Selectors, and it was very well received. Inspired by the feedback, here’s the next instalment. This time, we’re going over some useful JavaScript tips and tricks that you can use to make your Google Tag Manager deployment even more efficient. I’ve written a lot about JavaScript in this blog, and I intend to keep on doing so in the future. As always, if JavaScript is somewhat of a mystery to you, I strongly recommend you take the Codecademy (free) course on JS, and take a look at the other available web technology tracks while you’re there! Read More…