UTM Parameter

author avatar
Matthias Kupperschmidt
07. October 2023
8min read

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.
  • The utm_marketing_tactic parameter identifies the specific marketing strategies applied in a campaign, allowing you to track different tactics used to target your audience.
  • The utm_creative_format parameter specifies the type of creative used in your campaign, helping you differentiate between different formats or styles of advertisements.
  • The utm_id parameter is used to associate the campaign with an ID to then later import additional campaign data like cost to GA4


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
utm_creative_formatvideo ad

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.

The utm_term parameter should not be misused for any other information. Otherwise the keyword reports will get poluted with non-keyword data, making it hard to analyse the most profitable keywords.

So, by restricting utm_term only for keyword usage, you will be able to properly analyze keyword data in the GA reports.

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.

UTM content is not yet reported in Google Analytics 4 properties by default. You'll have to add it as a custom definition.

UTM Creative Format (utm_creative_format)

The utm_creative_format parameter helps you identify the type of creative used in your campaign, such as display ads, native ads or video ads.

So it allows you to track and compare the performance of different creative formats against each other. Be aware however, that this parameter is not yet shown in the Google Analytics 4 interface.

UTM Marketing Tactic (utm_marketing_tactic)

The utm_marketing_tactic parameter is used to identify the specific marketing strategies applied in a campaign. So it helps you to differentiate between different approaches to target an audience.

Be aware however, that this parameter is not yet reported in Google Analytics 4 properties.

UTM ID (utm_id)

When building campaign links, specify a unique ID value in the utm_id parameter.

Later, when uploading cost data for that campaign to GA4, use that same ID value. This allows GA4 to match the cost data to the corresponding campaign traffic.

By matching the IDs, Google Analytics can properly attribute the cost data to each specific campaign. Now you don't have to struggle with misaligned cost and performance data.

With UTM ID implemented correctly, GA4 reports will accurately reflect campaign return on ad spend. You can clearly see whether your campaigns are making or losing money.

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. So UTM parameters are session-level dimensions, meaning they apply to all hits in that same session.

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.

How to use UTM parameters with emails

By default, Google Analytics cannot accurately attribute traffic from email marketing campaigns. This traffic shows up as "Direct" in GA reports, giving no visibility into email channel performance.

To fix this, you can add UTM parameters like utm_medium=email to all links in your email campaigns. The utm_medium=email labels that traffic as coming specifically from email. Then in your GA reports, instead of aggregating email traffic under the ambiguous Direct channel, you will see that traffic shows up under the Email channel or under the utm_medium and utm_source values you specified in the links.

This gives you clear visibility into metrics like revenue, conversions, engagement for your email campaigns - insight you simply wouldn't have if you didn't implement UTM parameters.

In short, UTMs are crucial for unlocking visibility into the email marketing channel in Google Analytics.

How to use UTM's with TV, Radio or Print Ads

UTM parameters can be used in offline marketing like TV, radio, and print ads too.

For offline channels, the utm_medium parameter should define the offline medium (e.g., "tv", "radio", "print").

To include a trackable UTM link in offline ads you can use a scannable barcode or a clean URL that redirects to your landingpage URL with the UTM parameters added.

By doing this, you can attribute website traffic directly to offline marketing efforts and measure its conversions.

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 utm parameter analysis
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.

When doing campaign analysis, knowing about Google Analytics channel grouping is essential because it enables you to categorize and contrast traffic from various marketing channels, campaigns, sources, and mediums in order to evaluate performance.

Channel grouping and UTM parameters

1. Default channel groups and UTM parameters:

The default channel groups in Google Analytics 4 automatically categorize your website traffic into channels like Organic Search, Referral, Paid Social etc. This is done using rules behind the scenes.

UTM parameters (like utm_source, utm_medium, utm_campaign) allow you to customize your URLs to provide additional information about where traffic is coming from. For example, you can specify newsletter, email, summer-sale as UTM values.

So default channel groups categorize traffic automatically based on rules. UTM parameters allow you to customize your URLs to collect more campaign data that you specify. The UTM values will show up in the default channel that it matches. For example, an email campaign would show up under the Email channel.

2. Custom channel groups and UTM parameters:

Custom channel groups allow you to create your own categories and rules for traffic sources, beyond the default groups in Google Analytics.

For example, you could make a "Social Campaigns" group and customize channels within it using UTM parameters like utm_source and utm_medium.

So with custom channel groups, you have more flexibility to categorize traffic using UTM parameters however you want. The UTM values will show up as part of the custom channel group and channels you created.

Further Resources

Here are some further resources and references to learn more about UTM parameters:

author avatar
Matthias Kupperschmidt
07. October 2023
8min read