How to use UTM Codes to Track Campaigns in Google Analytics

What is a UTM Code?

A UTM code or UTM parameter is a code appended to a URL that allows you to see specific information in Google Analytics about who viewed your website.

You can track where traffic to your URL came from by variables that you define. For example, if you run an email campaign and want to see how many people clicked through to your website, you can add a UTM code to the URL in the email and you’ll be able to track the people that click on the link and their behaviour on your website.

Below is an example of a URL that has a UTM code attached to it.

utm code example

Why Should I use a UTM Code?

UTM codes are the most effective way of monitoring your online marketing campaigns to see how they are performing.

This helps to monitor the ROI of each campaign that you run and discover which marketing avenues are working and which ones are less successful. As a result, you can make better decisions about what type of campaign to run and where to invest your marketing budget.

How to Set up a UTM Code

To set up a UTM code you will need to add code to the end of your hyperlink. There are five different parts to this that you can add, three of these are required (required fields are marked with *).

Campaign Source (utm_source) *
This is the platform where you’re sending the links. E.g. Google, Facebook, Twitter.

Campaign Medium (utm_medium) *
This is the marketing medium/type of campaign. E.g. PPC, email.

Campaign Name (utm_campaign) *
This is used to denote a specific campaign. E.g. January sale

Campaign Term (utm_term)
This is used in paid search to denote the keywords used. E.g. Washing Machine

Campaign Content (utm_content)
This is used in A/B testing to differentiate between different types of content.

How to Generate a UTM Code?

Obviously, writing out the UTM codes for each URL would take a long time, so you need to use a tool to generate these.

Fortunately, there are multiple ways of generating UTM codes. Our favourite two are listed below.

Where do I see my UTM code in Google Analytics?

Once you’ve created your UTM codes and sent our your marketing campaigns. You’ll want to see how the traffic from each campaign is performing on your website. Crucially, you need to see if your campaigns are resulting in users completing a conversion on your website.

To find the information about your campaigns, log into Google Analytics and navigate to Acquisition > Campaigns > All Campaigns

Here you will see the name of your campaigns. You can change the Primary and Secondary dimensions filters to see more information about your campaigns.

google analytics campaigns

So that’s how to use UTM codes to track your marketing campaigns! Hopefully, you now know what UTM codes are, how to set them up, and how to view them in Google Analytics.