Your Definitive Guide to UTM Codes

 

UTM stands for Urchin Tracking Module and is a string appended to a URL to allow Google Analytics properly attribute a visit to the correct source, medium, campaign, and more. You can find Google’s tool to make your own UTM codes here. Don’t worry. They’re pretty simple to figure out and invaluable when you start running campaigns, want to see how visitors from specific sources interact with your website, and more.

http://marketinghackers.net/?utm_source=adwords&utm_medium=cpc&utm_campaign=example&utm_term=marketing_hacks&utm_content=ad_group_one is an example URL with a UTM code appended to it.

Lets go through the fields.

  • http://marketinghackers.net/ is the base URL or Website URL. That’s the actual link to the page. It can be any page on your website. I used the homepage for Marketing Hackers for the example.
  • ?utm_source=adwords is the Campaign Source, or basically where you’re telling Google Analytics that the click originated from. In this example I used Google AdWords or just “adwords.” It’s the referrer. If you were putting this link on another website, you’d set the source to that website’s name.
  • utm_medium=cpc is the Campaign Medium, or the marketing medium by which the click was generated. In this example it’s “cpc” or cost-per-click, a standard way of buying and paying for display ads.
  • &utm_campaign=example is the Campaign Name. I named this campaign “example.” It’s a good practice to name your campaigns in both your marketing dashboards, Google Analytics, and the dashboard of any paid campaigns you make in any 3rd party marketing platforms like Outbrain, Facebook, Twitter, etc.
  • &utm_term=marketing_hacks is the Campaign Term. In this example UTM string I used “marketing_hacks” to denote that the AdWords keywords that initiated the click were “marketing” and “hacks.” This is a good way to measure a campaign’s performance in Google Analytics by which keywords you used. If you ran an otherwide identical campaign except that your keywords in AdWords were “marketing” and “hackers,” you could measure performance for each set individually.
  • &utm_content=ad_group_one is the Campaign Content. Basically this is used to differentiate otherwise identical ads except for the copy (both images and text).

Got a good handle on it all now? You don’t even have to only use Google’s UTM codes and can set custom parameters as well that will show up as part of the URL in Google Analytics. A good use for this is measuring navigation on the site. Lets say you set the URL on the main menu of http://marketinghackers.net/ to be “http://marketinghackers.net/about/?ref=TN” instead of its default “http://marketinghackers.net/about/.” (?ref=TN stands for Reference and Top Navigation, respectively). Now whenever someone clicks “About” on the homepage, those pageviews would have their URLs have “?ref=TN” appended to them, appear separately in Google Analytics, and you would know how many visitors click to the about page during their visit, and what page they were reading when they did. Make sense?

It’s a good idea to keep all your UTM codes and ref codes in a spreadsheet to keep them tracked and organized. The UTM/ref slug always starts with a “?” and additional codes are added with “&” like in all the examples. Let me know in the comments if you have any questions or suggestions!

Also, check out my article Your Definitive New Website Checklist for Results to supercharge your SEO and more!

Mont Cessna on LinkedinMont Cessna on Twitter
Mont Cessna
Mont has 10+ years experience in digital marketing. Experienced with LAMP, CMS and HTML5/CSS3 website development, Mont also excels at math and C/C++/C#. He has managed multi-million dollar media buys though Outbrain, Facebook, Taboola, Yahoo Native, Google AdWords and a number of other display advertising vendors. Mont's written work has regularly appeared on the first page of Google News results and the homepage of Yahoo! He has a B.Sc. in Business Administration with a concentration in Marketing from Drexel University.