Skip to main content

Using UTM Codes to Track URLs within Google Analytics

By September 22, 2013July 27th, 2022Google Analytics, SEO

You have already heard of Google Analytics and its specific referral sources. However, by learning how to tag URLs using UTM codes allows you to use your data at an advanced level. Utilizing UTM codes permits a chance to isolate visitors from specific campaigns. This isolation helps develop understanding to your visitors’ preferences and behaviors.

What is UTM?

Before moving into explaining how UTM codes are set up, it is necessary to understand what “UTM” is. It stands for “Urchin tracking module” and are inserted at the end of URL’s and tell many analytics tools, including Google Analytics, more information about every link. Additionally, it connects these links to specific campaigns.

The link would look something like this:

Using UTM codes guarantees any destination URLs become labelled with specific campaign names when they’re reported in Google Analytics. Your traffic becomes broken down to its source and to specific emails or other campaigns you run.

What is the purpose of UTM Codes?

You need to determine how valuable your online campaigns are. If they are successful, more traffic visit your site. Tagging URLs assists in proving how effective your campaigns are. Remember, if you set goals up in Google Analytics, it will report every campaign’s conversion metrics. An example would be when using UTM variables on the links posted on social links to see the traffic received from every post published. Additionally, adding UTM variables helps for tracking specific links to your site from your Facebook page. URL tagging allows for greater understanding of any campaigns you run. Any search engine can provide conversion tracking and statistics around a variety of methods, like clicks, impressions, click-through-rates, and such. Yet, these stats do not explain what happens with users “post click” thus making URL Tagging incredibly useful for advertisers.

Structuring UTM Codes

To best structure your UTM codes, any understanding of each parameter is necessary.

  1. Campaign Source: this is basically the search engine or platform your ads run on (Google, Facebook, other websites, etc.)
  2. Campaign Medium: states what advertising campaign was used in the URL (email, PPC, etc.)
  3. Campaign Name: field where you can insert the name of the campaign

The three fields are necessary, but you can also use content and term parameters to track additional details such as any keywords from a campaign or if ads have different click points.

Setting Up URL Tagging

  1. Manual URL Tagging

When using a third-party advertising tool, you often have the ability to automatically tag URLs. These tags are for specific links with organic social posts, banner links, and other varying links for campaigns being used outside of third party software. When this happens, manual URL tagging is the only option.

It is not necessary to create each UTM tag by hand. Instead, use UTM generators including the following:

  • Excel URL builder
  • Effin Amazing’s Chrome extension
  • Google’s URL Builder
  • UTM Tagging template for Google Sheets

Google’s URL Builder generates URLs tagged with UTM codes for free, but works best for single campaigns. If you wish to create UTM tags in bulk or keep track of naming conventions, this may not be the best tool.

UTM Tagging Template

Since Google’s URL builder cannot allow an option for creating or tracking UTM codes, various sites have created a UTM tracker template to assist in generating multiple UTM tagged URLs to use during marketing campaigns. To obtain this, you need a Google account and to obtain the template here. Under “File” and “Make a Copy” to keep your own version and use it to tag any URLs you have.

Auto-tagging

Third party tools such as Buffer or Hootsuite to automatically tag URLs utilizing UTM variables, but they are for a price. Google AdWords can be used by advertisers for auto-tagging that uses UTM variables. This feature is a default within AdWords accounts, so it should be set up. If you wish to change that or check it, you can find the option under “Account settings” and “Preferences.”

Maintain Consistent Naming Conventions

When utilizing manual tagging, select a naming convention you can remember. For example, with your medium, you will likely use “Email” again and again with each new launch. When you tag your URLs in such a manner, means they can be broken down in your reports from Google Analytics and filtered through the campaign medium.

Also, use descriptive tags for your campaigns to be able to decipher every campaign and how it relates to the data in Google Analytics. Remember that it is important to maintain simple and descriptive text.

Improving Tagged URLs

UTM codes make ridiculously long, and ugly URLs in the eyes of  the user, but a simple solution can fix this. If the URL is like this:

http://www.anexample.com/tagging?utm_source=mysite.com&utm_medium=referral&utm_campaign=url+tracking+post

This URL is very long and not incredibly clean and friendly for users. By using a specific code, viewers won’t see it. Place the link into an anchor text (text that contains the link and can be clicked). Once in the connected landing page, add this piece of code:

_gaq.push(function() {

window.history.pushState(“,”,’some-page’);

});

to the HTML of the page. By doing this, Google Analytics code collects all attribution data from the longer URL, but the original URL reverts to what has been placed in the ‘some page’ section of the code. Be sure to change the ‘some-page’ to what you wish viewers to see.

Finding Tagged URL Data

After creating enough tagging campaign URLs to become comfortable with the process, start tagging URLs for your marketing campaigns. As this data comes in, you need to determine Analytics’ navigation to see what it says. Find it through the following: “Standard Reports” > “Traffic Sources” > “Sources” > “Campaigns” This report breaks down everything via the Campaign Name. If a campaign didn’t receive clicks, nothing is triggered. Those URLs do not report until they are clicked.

With this article and some attempts on your own, you will be able to easily create UTM codes and implement the tagging through Google Analytics. These methods will allow your marketing activities to become more centered and focused on the needs of your audience.

Geoffrey Purkis

Geoffrey is the Founder and CEO of Seattle Web Search. He’s a web developer and SEO (Search Engine Optimization) expert located in Seattle, Washington with extensive experience in the field. Geoffrey specializes in helping his clients find the right combination of web, search, social, and video content to get the best results from their online marketing efforts.