The Death Of UTM Campaign Parameters

September 9, 2014

blog-utm

UTM campaign parameters. We love them. We hate them.

They make it easy to track both online and offline marketing efforts. But they aren’t very pretty to look at, and they’re difficult to implement reliably, especially for a layperson (i.e. non-technical person).

Often, there’s a situation where we want to track a number of different approaches or people contributing to a campaign. Imagine the pushback you’ll get when you suggest each person modifies their UTM parameters to personally identify themselves or the approach they’re using.

Fortunately, there’s an easier way to track certain types of activities without having to resort to including all those UTM parameters. We can use a simple URL hash and some Google Tag Manager magic to uniquely identify each person.

The Problem

To illustrate this problem, I thought a personal anecdote would help. I was recently looking to buy some extra RAM for an older Mac Pro. I wasn’t sure what to get, and I had questions about sizes and configurations. Googling for answers brought up a host of forums with the same questions I had, and answers to those questions.

Now, imagine for a minute, that you own a company called RAM and You, which sells RAM for Mac Pros. You know the answers to a lot of computer hardware questions, including mine. And you have a support team that actively goes on third-party forums to answer questions, often linking back to your site and specific products.

Now, when you look at your Referrals report in Google Analytics, how do you know which users (and associated revenue) came from people who clicked on links left by your support team vs. people who clicked on links left by other people?

In other words, how much value is your support team driving by spending their time on these forums answering questions?

It’s always been possible to track this type of activity. You just had to have each member of the support team add UTM campaign parameters to the end of the links they shared on these forums. So if they shared a link on MacRumors, it would look something like:

ramandyou.com/apple/memory/Macbook_Memory?utm_source=forums.macrumors.com&utm_medium=referral&utm_campaign=support

Not only is that an ugly link to share in an answer on a forum, it’s also hard for a non-technical person to remember and get right (there are 73 characters/opportunities for typos in those utm parameters!).

The Solution

What if, instead, you just shared the following link:

ramandyou.com/apple/memory/Macbook_Memory#1

Two extra characters. Simple. Clean. Not ugly.

Two extra characters & GTM

There are two basic parts to making this work. The first part is modifying the link (adding those two extra characters). The second part is capturing the value included in the link and passing that through to Google Analytics.

The steps below will illustrate how to do the second part using Google Tag Manager (GTM). It can also be done without GTM, you’ll just need to write some scripts and add them to your site manually.

Part 1: Identify Yourself

To track your support team’s efforts (while at the same time making it easy for them to implement) simply add a number to the end of the link URL being posted in the answer (like shown above). This number can identify which support person left the answer or which team/office/vertical was involved.

For example, if you have 3 support team members posting answers on third-party forums, you would assign each person a number – 1, 2, and 3. If person 1 posts an answer linking back to your RAM installation videos, the link URL would be:

ramandyou.com/installvideos/#1

A couple of things to note about this format:

1. We’re setting this number as part of the URL fragment. A URL fragment is the part after the hashmark (#). This is important because Google Analytics ignores URL fragments, so you won’t see the same page showing up three different ways in your reports.

2. The number after the hash (#) would identify which support team member left the response. So each support team member would have their own number, and each would add a different number to the end of their links (e.g. #1, #2 and #3).

If this is not important to you, you could use this parameter to identify other information you’d like to know (e.g. which brand or product the post was about). Just keep it simple, easy to remember and easy to to type in for the support team members leaving the answers.

3. This works as long as the page you’re sharing doesn’t already include a fragment. For example, if you’re sharing www.example.com/awesome-page#section2, you can’t just add an additional hash at the end (www.example.com/awesome-page#section2#1 will not work). In this case, you would need a slightly different solution (e.g. use query parameters instead of URL fragments).

4. Rather than messing with source/medium/campaign, we’re using a Custom Dimension to group all activity from one of these links together. If that link that was posted by your support specialist gets tweeted or passed around, you’ll still see exactly where the traffic is coming from, but you’ll also be able to attribute it back to the correct team member.

Part 2: GTM

In Google Tag Manager, we can capture the value of this URL fragment (when it exists) and send it as a session-level custom dimension.

To do this, first we need to create a macro in GTM to grab the URL fragment. This is easy (see below):

gtm-utm-1

This macro will grab the value after the hash (#). So for ramandyou.com/installvideos/#1, the value of this macro will be 1.

Then, we need to create a Lookup Table Macro that matches the value of the previous macro to the appropriate support team member.

lookup table macro

This macro looks at the {{url fragment}} macro we just created, and based on that value sets the appropriate name for the support specialist.

So now that we have our {{support specialist}} macro, we can use that in our Google Analytics pageview tag. I recommend setting this as a session-level custom dimension (which requires first setting up the custom dimension in Google Analytics).

custom dimensions google tag manager

Now that you’re sending this as a custom dimension, you can use this in your reports or build a custom report that shows you exactly how much each of your support team members contribute to site traffic and revenue!

utm-custom-small