Track Users Who Are Offline in Google Analytics

The steady increase in mobile use over the last years has introduced some new challenges for web analytics. It’s not just about mismatches in the tracking model (the concept of sessions is even more absurd for apps than it is for desktop browsing), but about something more fundamental, more basic. Think about it: if a visitor visits the website using a mobile device, there’s a significant chance of them losing internet connectivity and going unintentionally offline. Read More…

Two New Unofficial GA Add-Ons for Google Sheets

More often than not, much of what we do in web analytics can be automated. This applies especially to implementations, audits, configurations, and reporting. So when I’m faced with a menial, manual task that might take hours for me to complete if done by hand, I always look at what could be done with some scripting and API work. I want to introduce a couple of Google Sheets add-ons I’ve written and released to the public. 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…

100+ Google Tag Manager Learnings

I’ve always been proud to avoid the typical headline clickbait of “Ultimate guide to pigeon care”, “All you need to know about the Great Vowel Shift”, “Did you know that you’ve been smoking peyote wrong your whole life?”. I’m ready to make an exception now by adding a BIG WHOPPING NUMBER to the title. You see, the amount of knowledge one can accumulate about anything they do on a daily basis is mind-blowing. Read More…

Mixcloud Player Tracking in Google Tag Manager

A couple of years ago I wrote an article on tracking interactions with the SoundCloud widget via Google Tag Manager. When a platform provides a JavaScript embed API, it’s surprisingly easy to track interactions with the player. You’ve seen this with YouTube, with SoundCloud, with JWPlayer, and now you’ll see how to do this with the Mixcloud player. If you don’t know what Mixcloud is, well it’s a hugely popular streaming service for DJs, podcasts, radio shows, and other published radio media. Read More…

Automated Tests for Google Tag Manager's DataLayer

One of the biggest fears I have as a Google Tag Manager user is a broken release of the website (or app) on which I have deployed GTM. Far too often, lack of proper communication practices within an organization lead to a release being pushed out without thoroughly testing how this release impacts any existing tracking solutions. Luckily there are ways to mitigate this. The most significant and impactful precautions you can take are all about process: 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…

#GTMTips: Restrict Custom HTML Tag Scope

What better way to celebrate the 50th #GTMTips article than, well, a really useful Google Tag Manager tip?! This tip is so useful and simple; it encapsulates everything that I had in mind when starting this series. The tip is about restricting scope of Custom HTML Tags. This is an important concept, because it’s possible that you’re stuffing your page’s global JavaScript namespace with all sorts of junk, and thus inadvertently causing conflicts. Read More…

10 JavaScript Concepts for Web Analytics Implementation

I’ve already written extensively about JavaScript in web analytics implementation. Suffice to say, understanding at least the basics is absolutely necessary to survive in the technical medium of the web browser. This article expands on a conference talk I gave at MeasureCamp IX, London a short while ago. I’ve always been quite single-minded about the importance of JavaScript in web analytics development, and it was a pleasure for me to get some of that off my chest. Read More…

Simple Tracker Duplication for Universal Analytics

First of all, I’m sorry about the title. I should really stop throwing the word “simple” around, since people always tell me that the stuff I claim to be easy and straightforward is rarely so. But since this is my blog, I reserve the right to use whatever stupid and misleading terminology I want. I maintain that what follows IS quite simple, especially when considering the amount of complexity it reduces in your Universal Analytics setup. Read More…