How to create UTM codes in Google Analytics

You spend thousands on marketing and advertising to promote your business. Ideally, the returns on your PPC and CPC investments are exponentially higher than your ad spend. But, if you can’t track your campaigns, how will you know what’s working and what’s not?

Before you go live with any digital ad, you need a way to track it. And, that’s where UTM codes come in.

They can provide a 180-degree view of digital ad campaign success in Google Analytics.

Here, you’ll learn the basics of UTM codes and how to create them for Google, Facebook, other paid social, email, and mobile ads.

So, this is what’s in store:

Now, let’s get to it.

What is a UTM code?

Urchin Tracking Module (UTM) codes or “tags” are the lifeblood of campaign traffic monitoring in Google Analytics. They are essentially unique URLs that redirect to website pages to help campaign managers identify where traffic has come from.

Typically, a unique UTM is generated for each individual ad to measure the amount of traffic that comes from a specific source.

Google History Fact

In 2005, Google acquired Urchin, a web statistics analytics program, from Urchin Software Corporation. When first acquired, it was called “Urchin by Google.” Now, the platform is known simply as Google Analytics. So, if you’ve ever wondered where Urchin Tracking Module (UTM) codes got their name, here you have it.

How do UTM tags work?

When creating ad campaigns in Google Analytics, UTM codes can be added to the end of a URL to distinguish the source, medium, campaign name, and more.

UTM Codes in Google Analytics
UTM Codes in Google Analytics

In Google Analytics, page visits to URLs with UTM codes appear separate in traffic reports. When campaign managers see precisely how much traffic is generated to each unique URL, they can easily measure which campaigns have the highest conversion rates. Advertisers can then adjust marketing strategies accordingly.

Google Tracking URL Parameters

While various advertising and marketing platforms offer their own form of tracking links, UTM codes are unique to Google Analytics. Within generated tags, there are three required and two optional identifiers.

Google Analytics URL Parameters
Google Analytics URL Parameters
  1. *Campaign Source – Distinguishes the traffic source (google_search_engine, facebook, pinterest, etc.): “utm_source”
  2. *Campaign Medium – Tells what medium was used (banner, text, linkedIn_feed_post, etc.): “utm_medium”
  3. *Campaign Name – Identifies the title of your ad campaign: “utm_name”
  4. Campaign Content– Differentiates between similar ads that point to the same original URL: “utm_content”
  5. Campaign Term – Denotes the specific, paid keyword term or search phrase targeted: “utm_term”

These standard parameters help keep unique URLs organized. Furthermore, Google Analytics’ program knows how to read them so that they render with clarity in platform-generated reports.

How to Create UTM Codes Across All Ad Platforms

While the above explains the whats and whys of UTM tags in URLs, you still don’t know how to create UTM codes for various campaigns across the web. Fortunately, that’s what you’re about to learn. Read on to discover how to create codes for Google Ads, Facebook, other paid social, email, and mobile advertising.

Digital Ad Tracking Tip

Keep track of all of your parameters and campaign rules in a spreadsheet to keep operations organized and uniform.

1. General UTM Codes and Google Ads

One of the most common places you’ll need UTM codes is in your Google Ads account. Here, you create ads that show up in Google’s search results and partner sites across the web. In this realm, you have two options.

1-A. Automatic Option (Recommended for Google Ads)

Google’s automatic UTM creation option is the easiest way to go. Let Google generate the appropriate tags for you. And, chances are, this is already done. Just to be sure, here’s what you need to check.

  1. Make sure that your Google Ads account and the correct Google Analytics property are linked.
  2. See that auto-tagging is enabled in your Google Ads Account.

With this option, Google Ads automatically adds UTM parameters to links and sends them to Google Analytics.

1-B. Manual Option (For External Ads & Advanced Campaigns)

If your Google Ad campaign has an advanced need that requires you to add custom UTM parameters manually, or you need to track an external campaign, use Google’s UTM builder tool.

UTM builder
UTM builder

Simply enter the appropriate information and the tool will instantly generate an appropriate code.

Share the UTM campaign URL
Share the UTM campaign URL

You can then automatically copy the URL to your clipboard to use for various ads. Or, you can convert the link to a short link (this option is actually just a redirect to

2. UTM Codes for Facebook Ads

Before you go live with Facebook ads, it’s wise to add unique UTM parameters to each ad. You’ll need to login to your Facebook Ads account to do this.

Once you’re in, navigate to Ads > Edit > Build a URL parameter.

Build a URL parameter
Build a URL parameter

From here, you can add the appropriate parameters to track your campaigns. Note that Facebook ads enable the campaign content parameter, but not campaign terms.

When Facebook ad campaigns are properly setup, you will be able to see exactly how much traffic comes from each Facebook ad you create from your Google Analytics dashboard.

Google Analytics Tip

You can add multiple channels in Google Analytics, such as “Paid Social” or “Facebook Ads” and configure these channels to report only on data from specific campaigns.

3. UTM Codes for Other Paid Social Ads

With paid social ads, the easiest route is to use Google’s URL builder and follow your parameter organization method. Create a unique UTM link for each ad.

For the campaign source, enter the name of the platform where the ad is hosted (i.e. Linkedin, Twitter, Snapchat, etc.). The campaign medium could be “cpc” or another relevant term.

Unlike with Facebook, when creating UTM parameters for other paid social ads, you do have the option to add custom campaign terms.

4. UTM Codes for Email Ads

For email ads, Google’s UTM builder tool will again come in handy. Use your usual parameter organization method and make sure you have distinct UTM codes for each ad.

The below reference values might come in handy for UTM for email ad campaigns.

Campaign Source hubspot, mailchimp, or other CRM


subscriber list identifier

Campaign Medium email
Campaign Name name of the email campaign
Campaign Term identify CTA when using multiple CTAs in an email

5. UTM Codes for Mobile Ads

If you have a mobile app, and you want to know which campaigns are helping and hurting promotion, UTM codes can come in handy in one of two ways:

  1. Allow you to see which external websites, apps, and ads refer new users to your app.
  2. Enable tracking of campaigns and referrers that launch your app after it is downloaded.

As with Facebook and unlike most other digital ad channels, mobile ad campaigns have dedicated UTM builder tools for each marketplace. From these tools, you can generate tags that will be compatible with Google AdMob, Jampp, MobFox, and many other mobile ad networks.

Google Play URL Builder
Google Play URL Builder

Access the mobile tracking URL builders for Android and Apple below.

  1. Google Play URL Builder
  2. iOS Campaign Tracking URL Builder

Most parameters for mobile tracking is in alignment with other channels. For campaign content, you might want to differentiate by link type (i.e. logo, text, image, etc.).


There are several tools that will make UTM code creation easier, based on where your ads will appear. And, if you keep track of your campaigns, you’ll learn which ones are the most successful and which ones are a waste of time. Then, you can adjust your ad campaigns accordingly for the highest possible returns on ad spend.

If you need help with your digital marketing campaigns, don’t hesitate to reach out to 1o8. Our experts are happy to help!

check out our articles

Shahira Marei

Creating Jobs One Cookie at a Time

Shahira Marei is the Founder and CEO of The Dirty Cookie, a gourmet dessert company renowned for its one-of-a-kind cookie shot glasses. The concept was …

Heather Terry

Heather K. Terry of GoodSam Foods Does CPG Right in a Changing Economy and Planet

Heather K. Terry is the Co-founder and CEO of GoodSam Foods, a sugar-free, equitable, and B-certified chocolate company that partners with global farmers. Her first …

Ayeshah Abuelhiga

How Ayeshah Abuelhiga Is Paving the Way for First-Generation Founders, One Meal at a Time

Ayeshah Abuelhiga is the Founder and CEO of the Mason Dixie Biscuit Company, a frozen biscuit brand committed to producing food made with fresh, clean, …

Scroll to Top