Blog

A blog about data-driven marketing.

EasyAutoTagging – Built to Automate Campaign Tagging & Tracking at Scale

Learn More

Step Up Your Game & Track Custom UTM Parameters in Google Analytics

Ever find yourself limited by standard parameters and wish you could see Custom UTM Parameters in Google Analytic reports?

I have, and from what I came across in forums others have as well which prompted me to wire a simple step by step guide.

So yes it is possible ūüôā and here is how but first let’s go over the basics.

giphy 2

What are UTM Parameters?

UTM stands for Urchin Tracking Module.

Google defined the five standard tracking variables in its early Urchin days (Pre-Google Analytics).

The five standard parameters Google Analytics provides are:

Campaign Source

Campaign Medium

Campaign Name

Campaign Term

Campaign Content

Using Google’s Campaign URL Builder, you can build URL Parameters that look something like this:

https://example.com/?utm_source=facebook&utm_medium=cpc&utm_campaign=spring+sale&utm_term=green+cta&utm_content=lifestyle+image

You can find the above parameters as dimensions in Google Analytics in standard and custom reports as primary and secondary dimensions.

Custom UTM Parameters

What are Custom UTM Parameters?

In the above example, I am using the medium as the audience instead of CPC or social.

In theory, this works (and I do use it for some clients) but it can mess with your default channel grouping and measurement plan.

And what if you are looking to track additional values such as Site ID or Placement?

You can append custom parameters to your URLs but the problem is that you cannot see these in Google Analytic reports standard and custom.

This quick guide solves precisely that problem.

It is a pretty simple set up as long as you are managing your tags via Google Tag Manager.

Creating Custom UTM Parameters

Since these are custom, you can define these however you want. I like to follow the Google format, but that is not required.

Make sure to come up with a clean and consistent naming structure that can be applied account wide.

For this example, I will create a custom parameter so that I can pass my Facebook Campaign Audiences to a Google Analytics custom dimension called Audience.

My Custom UTM Parameter

utm_audience

And here it is appended to a URL:

https://example.com/?utm_source=example+source&utm_medium=example+medium&utm_audience=example+audience+1

Creating The Custom Dimension

Now that we have our Custom UTM Parameter defined let’s set up our Custom Dimension.

Go to admin, navigate to the middle Property column and click on Custom Dimension under Custom Definitions.

Custom UTM Parameters

Click create +New Custom Dimension.

Custom UTM Parameters

Give the Custom Dimension a Name and call it Audience and set the Scope level to Session.

Custom UTM Parameters

Remember your custom dimension Index Number since we will be using it in the next step.

Custom UTM Parameters

Passing Custom UTM Parameters Value to Custom Dimensions

Ok, let’s head over to the Google Tag Manager for the remainder of the setup.

First, we need to create a User-Defined Variables and call it utm_audience

Custom UTM Parameters

Choose URL as the Variable Type

Custom UTM Parameters

Change the Component Type to Query and define the Query Key as utm_audience and click save.

Custom UTM Parameters

Now head over to your Google Analytics Tag in GTM and expand More Settings.

Custom UTM Parameters

Under Custom Dimensions define the Index Number that corresponds with your Audience Dimension and set the Dimension Value using the utm_audience variable.

Custom UTM Parameters

Click save, publish your changes and you are done.

Finding the data in Google Analytics

You can now access your custom dimension in custom reports or standard reports as a secondary dimension.

For example, below I am looking at the standard source/medium report with Audience pulled in as a Secondary Dimension.

Custom UTM Parameters

Conclusion

Setting up Custom UTM Parameters this way is super helpful in tracking and reporting on additional values outside of the five standard Google UTM variables.

What will you be tracking using this approach?

Leave a comment

Your email address will not be published. Required fields are marked *

Hi,

does it work also with other queries, such as “#”?

For example, can it read “company” from URL mysite.com/#company?

Thank you for letting me know.

All the best,

Lukas

Reply

Hi Lukas,

Yes, it is possible to apply a similar approach using URL Fragments.

Here is a good post on how to do this http://bit.ly/2qU9mBR

Reply