Google Tag Manager: SoundCloud Integration

According to their website, SoundCloud is “the world’s leading social sound platform where anyone can create sounds and share them everywhere”. For artists, it’s a channel for distributing previews of their tracks, and for people like me it’s a nice way to do some API tinkering. To each their own, I guess! I saw a number of requests in the Google+ Google Tag Manager community about a SoundCloud integration, so I decided to look into it to see if I could just build one. Read More…

Data Is Difficult

Data is difficult. Growing a business is difficult. Measuring success is difficult. And you know what? They should be difficult. Otherwise we’d all be equally stupid, whereas now those of us ambitious enough to exert themselves are winning the race. And it’s not just working with data that’s difficult. The whole Web is a mess! Search engine optimization consultants, for example, are trigger-happy in doling out advice about server-side redirects without stopping to consider the implications of what they’re recommending. Read More…

Spam Filter Insertion Tool

Last weekend, I wrote a very simple web app that automatically creates a number of referral spam filters to tackle the problem that seems to have everybody all riled up. For a nice recap of the situation, take a look at this post by Jeff Sauer, or this article by Mike Sullivan. This isn’t an opinion piece, even though I’ve got a great number of opinions about this issue. Read More…

Universal Analytics Plugins Explained

There are many tools and methods to make Google Analytics more manageable. Google Tag Manager is probably the best known of these, and you can find many, many articles about GTM on these pages as well. However, today I want to tell you about one of the features of Universal Analytics that hasn’t, as far as I know, received too much attention. It’s funny, because at the same time almost everyone uses the feature in the shape of eCommerce, enhanced link attribution, and cross-domain tracking. Read More…

Access the Tracker Object in Your Page View Tag

If you read my previous post on fetching the Client ID from the Universal Analytics tracker object with Google Tag Manager, you might have agreed with me that it sucks you can’t access the tracker object interface in real time using Google Tag Manager. This is because all of the set commands you add to a Universal Analytics tag template take place before the analytics.js is loaded and the tracker object is properly created. Read More…

Improve Data Collection With Four Custom Dimensions

Since writing my rant about the schema conspiracy of web analytics platforms, I’ve been giving the whole idea of hit-level data collection a lot of thought. Sessionization is very heavily implemented in Google Analytics, which is understandable, but the regular Google Analytics API just doesn’t give you the kind of information you’d need, if you wanted to stitch hits together differently in your own backend. In fact, there are four distinct levels of aggregation that are not exposed via the API, even though I think they should: Read More…

Send Weather Data to Google Analytics in GTM V2

In 2013, I wrote a guide for Universal Analytics and Google Tag Manager on how to poll for weather conditions, and send this information to Google Analytics as a custom dimension of the session. The guide was intended as a technical introduction to Google Tag Manager, and I think it succeeded in that. However, GTM has changed a lot over the last 1.5 years, and I’ve made some improvements to the method along the way. Read More…

The Schema Conspiracy

A schema is something that data processing platforms such as Google Analytics apply to the raw hit data coming in from the data source (usually a website). The most visible aspect of Google Analytics’ schema is how it groups, or stitches, the arbitrary, hit-level data coming in from the website into discrete sessions, and these are actually grouped under yet another aggregate bucket: users. But you already know this. You’re looking at metrics like Sessions, Bounce Rate, Conversion Rate, and you’re using them or variations of them as KPIs in your dashboards and whatnot. Read More…

"Matches CSS Selector" Operator in GTM Triggers

Be honest, can you think of anything that’s more unfair than this: A new Google Tag Manager feature, published at 02:07 AM my time, and with an easter egg hunt involved?! Of course it was the infuriating Charles Farina who found the new feature and claimed the prize. Curses! (Just kidding Charles, you’re still awesome.) Anyway, there’s a new GTM feature in town, and oh boy, this time it’s a big’un! Read More…

Leverage UseBeacon and Beforeunload in Google Analytics

This nifty little solution will let you calculate the time spent on pages that are not tracked in Google Analytics by default. These include both bounced landing pages and exit pages. Bounced pages and exit pages lack the necessary subsequent pageview, which Google Analytics uses to calculate time-based metrics. Before you go on, read this excellent article by Yehoshua Coren: REAL Time On Page in Google Analytics Yehoshua gives a very nice use case for the technical solution I’m about to explore. Read More…