UTM Parameter

UTM parameters, standing for Urchin Tracking Module, are critical components in digital marketing and analytics, specifically within Google Analytics setups.

They are snippets of text added to the end of a URL via query parameters to help track the success of online marketing campaigns.

Five different UTM parameters exist: utm_source, utm_medium, utm_campaign, utm_term, and utm_content.

  • The utm_source identifies the site that sent the traffic, a required parameter for any UTM tracking.
  • The utm_medium identifies the type of link used, such as cost per click or email. Also a required parameter.
  • The utm_campaign identifies a specific product promotion or strategic campaign.
  • The utm_term is used to identify search terms.
  • The utm_content identifies what specifically was clicked to bring the user to the site, often used for A/B testing and content-targeted ads.


Let's look at an example with an imaginary link to a landing page and some values for the parameters.

Campaign link to landing page: https://example.com/sale

Values for parameters:

UTM ParameterValue
utm_campaignspring sale 20%
utm_termmen's wear
utm_contentyellow background

Final link including UTM parameters


Note that values will have to be URL encoded at the end. But don't worry about it. Tools (see further down below) will do that for you automatically. You don't have to do it manually.

Also be mindful of case sensitivity with UTM parameters. Even a simple change from lowercase to uppercase will split your Google Analytics data into a different campaign name, for example.

What is the purpose of using UTM parameters in Google Analytics?

UTM parameters in Google Analytics track the number of website visitors from specific links, which is crucial for assessing paid ad campaigns.

By monitoring purchases made by these visitors a digital marketer can subtract the campaign cost from these profits to determine the campaign's return on investment (ROI).

Understanding Different Types of UTM Parameters

UTM Source (utm_source)

This parameter identifies the origin of your traffic e.g. the website or publication. For instance, if your traffic is coming from a social media platform like Facebook, your UTM source would be utm_source=facebook.

It's crucial to accurately identify your traffic sources to understand which websites are driving the most visitors.

UTM Medium (utm_medium)

This parameter specifies the marketing medium, such as email, banner, CPC (Cost Per Click) or newsletter.

With the utm_medium you can so to say differentiate further between different ways of how the source generated traffic for you. For example, if you're running an banner campaign on another website, your UTM medium would be utm_medium=banner .

This helps you identify which marketing medium is most effective.

For attribution to any of the default channel groups, Google Analytics relies heavily on utm_medium, so you will want to use the appropriate value to make default channel grouping work. Otherwise you'll risk that the visits are grouped into a wrong channel.

Follow the values as stated in below table to ensure correct channel grouping for your campaign traffic (source).

DirectSource exactly matches direct AND Medium exactly matches (not set) OR Medium exactly matches (none)
Organic SearchMedium exactly matches organic
SocialSocial Source Referral exactly matches Yes OR Medium matches regex ^(social|social-network|social-media|sm|social network|social media)$
EmailMedium exactly matches email
AffiliatesMedium exactly matches affiliate
ReferralMedium exactly matches referral
Paid SearchMedium matches regex ^(cpc|ppc|paidsearch)$ AND Ad Distribution Network does not exactly match Content
Other AdvertisingMedium matches regex ^(cpv|cpa|cpp|content-text)$
DisplayMedium matches regex ^(display|cpm|banner)$ OR Ad Distribution Network exactly matches Content
(unavailable) or (other)Sessions don't match any channel description.

UTM Campaign (utm_campaign)

This parameter is used to identify a specific campaign name. For instance, if you're running a spring sale, you might use utm_campaign=spring_sale.

This allows you to distinguish between campaigns and compare its individual performance.

UTM Term (utm_term)

This parameter is used to identify the search terms used in paid search campaigns. For example, if you're targeting the keyword 'running shoes' with Google Ads, your UTM term would be utm_term=running+shoes.

This helps you to understand which keywords are driving the most traffic.

UTM Content (utm_content)

This parameter is used to differentiate similar content or links within the same ad.

For instance, if you have two different headlines within the same email campaign, you can use utm_content=spring_sale_is_here and utm_content=20_percent_off to track which headline is generating more clicks.

How UTM parameters work with Google Analytics

When a user clicks on a link embedded with UTM parameters the parameters become visible in the URL of the browser's address bar when the session begins.

UTM parameters are added to the URL as query parameters. Google Analytics then automatically attributes the session based on the information from the utm_source and utm_medium query parameters present in the URL.

This automatic attribution mechanism allows you to track the source and medium of your traffic without any additional configuration.

Adding UTM parameters to a URL does not affect the page load or functionality of the website.

Furthermore, Google Analytics is designed to filter out these parameters when displaying URLs in the interface, ensuring that your reports are clean and easy to understand. The interface will only show the clean URL, eliminating any potential grouping issues caused by the parameters.

How to create UTM parameters for URLs

Creating UTM parameters for your URLs is a straightforward process with the right tools. Instead of manually editing your URLs, use a tool like the Campaign URL Builder. This tool allows you to input the necessary information and automatically generates a URL with the appropriate UTM parameters.

When using the utm_medium parameter, ensure to use the correct values as per the provided table to enable effective default channel grouping in Google Analytics.

Once your URL with UTM parameters is generated, save it in a spreadsheet or similar tool for future reference. This practice ensures consistency in your tracking efforts and allows for easy access whenever you need to use the URL again.

Use of UTM Parameters with Different Platforms

How to use UTM parameters with Facebook ads

You can add UTM parameters during the ad creation workflow in Ads Manager.

You have the flexibility to use the custom parameters you choose yourself or utilize Facebook's dynamic URL parameters, which automatically populate values to UTM parameters based on your ad setup and delivery. Facebook offers dynamic parameters like ad_id, adset_id, campaign_id, ad_name, adset_name, campaign_name, placement, and site_source_name - which, as you can see, are very similar to UTM parameters.

So for tracking with Google Analytics, you might use parameters like utm_campaign={{campaign.name}}&utm_content={{ad.name}}. These dynamically fill in the campaign and ad name when you run your ad.

How to use UTM parameters with HubSpot forms

You can create UTM codes in HubSpot by navigating to your Analytics Tools, opening the Tracking URL Builder, and filling in each attribute of your UTM code. As always with UTM parameters it's crucial to maintain consistency in your UTM codes, ensuring they are concise, descriptive, and uniformly capitalized. It's also beneficial to keep a running list of your UTM links for easy reference later on.

How to use UTM Parameters with hashbangs

When using UTM parameters with hashbangs in URLs, the hashbangs must be placed after the UTM parameters.

For example, a URL like www.example.com/#top should become


...after adding UTM parameters.

If URL encoding is required, use functions like encodeURIComponent() in JavaScript to encode the hash character. This ensures the correct functioning of both the hashbangs and UTM parameters.

Common Mistakes in Using UTM Parameters

Here is a list of common mistakes I encountered with my clients when working with UTMs:

  • Wrong utm_medium values - which then hinder Google Analytics to do the proper channel grouping. To use the right value read above "Understanding Different Types of UTM Parameters" > utm_medium.
  • Case-sensitivity - make sure you have all your links in lower case
  • URL encoding - Do not write the values yourself and just fill out some fields in a tool which then generates the link for you. It will take care of URL encoding for you
  • Not using descriptive names for campaigns, terms or content
  • Inconsistent UTM values - it will make your campaigns incomparable. That's why you want to save each link in a sheet for later reference
  • Not adapting UTM values when a campaign was edited - the the campaign value should be adapted so you can distinguish between both campaigns later on
  • Forgetting to distinguish between organic social and paid social links

Software and tools that can assist in generating UTM parameters

Data Analysis and Campaign Effectiveness

In order to find the Google Analytics report that shows you the visitors from your campaigns, visit Reports > Acquisition > Traffic acquisition in the GA4 interface.

Google Analytics standard report for campaign traffic

Now, if you scroll to the right of the table, you can see all the conversions and revenue that those campaigns generated.

Additionally, to asses the quality of the campaign traffic look at engagement rate and 'average engagement time per session' to see how long people generally stayed on your site, after they clicked the UTM tagged link.