UTM Codes: How to Set Up Campaign Tracking [2026]

  • Add UTM codes to links you share outside your website so Google Analytics (GA4) can show which email, text, social post, ad, or printed piece sent each visitor. 
  • Use source, medium, and campaign consistently, and keep values lowercase so one campaign doesn’t get split across multiple rows in your reports. 
  • Keep a simple naming sheet and reuse the same values instead of making up new ones each time. 
  • Turn on automatic UTM tracking if your tool supports it so you don’t have to tag every campaign link by hand.

“Urchin Tracking Module” probably isn’t something you expected to encounter while figuring out whether your latest email worked. But that’s what UTM stands for, and behind the strange name is a simple way to see what’s actually driving traffic to your website.

Say you send a newsletter on Monday, post on Instagram on Wednesday, and hand out flyers at the farmers market on Saturday. By the end of the week, your website traffic is up. That’s great news, but which of those efforts brought people in?

That’s a question plenty of small businesses struggle with. According to Constant Contact’s 2025 State of Small Business Marketing Report, 23% of small brands surveyed globally say their number one frustration is not knowing what’s driving results. UTM codes help connect those dots, so you can see which emails, social posts, texts, ads, or even printed materials are bringing people your way.

In this guide, you’ll learn how UTM codes work and how to set them up step by step. We’ll cover the five parameters you’ll use most, tips for using UTM codes across different channels, a simple monthly checklist, and common mistakes to avoid.

What are UTM codes?

Think of a UTM code as a label attached to a link. When someone clicks it, that extra information travels with the visit and helps Google Analytics (GA4) identify where the traffic came from.

Here’s what that looks like for a bakery promoting its holiday menu.

  • The plain link is https://www.example.com/holiday-menu.
  • The tagged version is https://www.example.com/holiday-menu?utm_source=newsletter&utm_medium=email&utm_campaign=holiday-menu.

Everything after the question mark is made up of UTM parameters. In this example, they show that the visitor came from a newsletter, through email, as part of the holiday menu campaign. The ampersands simply separate each parameter.

And if you’re still wondering about the name, here’s a fun bit of marketing trivia: “Urchin” comes from Urchin Software Corporation, the analytics company Google acquired before launching Google Analytics.

The 5 UTM parameters at a glance

UTM parameters give Google Analytics different details about a click. You’ll use source, medium, and campaign most often, while content and term help when you need more detail.

Google Analytics recommends including utm_source, utm_medium, and utm_campaign when you create campaign URLs. 

Parameter What it answers Always include? Example
utm_source Where the visit came from Yes newsletter, instagram, local-partner
utm_medium The type of channel Yes email, sms, social, print
utm_campaign The promotion or campaign Yes holiday-menu, giving-tuesday
utm_content Which link, button, or version got the click Optional top-button, footer-link
utm_term Which paid search keyword brought the visit Optional birthday-cakes-near-me

Google Analytics also accepts a few extras, such as utm_id (a campaign ID) and utm_source_platform (the platform that directed the traffic). 

Google’s setup guidance recommends filling in every relevant parameter, because missing values show up as “(not set)” in your reports.

How to set up UTM codes step-by-step

Here’s a simple process you can follow to tag your first link. It works with almost any marketing tool you already use.

Step 1: Decide what you want to learn

Before you start adding UTM codes, decide what you want the link to tell you. That keeps your tracking focused and makes the results much easier to read later.

Start with one specific question, such as:

  • Which channel works better? Did more people visit your holiday menu from your email newsletter or Instagram post?
  • Which link gets more attention? Did readers click the button near the top of your email or the text link near the bottom?
  • Did an offline promotion work? Did anyone scan the QR code on the flyer you left at the local coffee shop?

Your question will help determine which links need their own UTM codes. For example, if you’re comparing email and Instagram, tag the link in each channel separately. If you’re comparing two links inside the same email, each link will need a slightly different tag so you can tell them apart.

Start with one question per campaign. You can always track more once you’re comfortable reading the results.

Step 2: Pick your source, medium, and campaign names

Now choose the exact words you’ll use for each UTM field. Keep them short, descriptive, and consistent so your reports stay easy to read.

Using the bakery example:

  • Source: Use the specific place the visit came from, such as newsletter, instagram, or farmers-market-flyer.
  • Medium: Use the broader channel type, such as email, social, sms, or print.
  • Campaign: Use one name for the promotion you’re tracking, such as holiday-menu or spring-class-schedule.

For the bakery’s email newsletter, that might look like: 

  • utm_source=newsletter&utm_medium=email&utm_campaign=holiday-menu

If the bakery promotes the same holiday menu on Instagram, keep the campaign name the same and change the source and medium: 

  • utm_source=instagram&utm_medium=social&utm_campaign=holiday-menu

That consistency makes it much easier to compare how the same campaign performs across different channels.

For medium in particular, stick with standard values where possible. GA4’s default channel rules use values such as email and sms when grouping traffic into channels, so variations like e-mail, text, or insta can make your reports messier.

Step 3: Write your naming rules in a simple sheet

This part isn’t glamorous, but it can save you a lot of cleanup later. Create a simple spreadsheet to record the UTM names you use and reuse them for future campaigns.

For a small business or a one- or two-person team, you only need a few columns:

  • Date and link: Record when you created the link and paste in the full tagged URL.
  • Source, medium, and campaign: Save the exact values you used.
  • Where it was used: Note the email, social post, text, ad, or flyer where the link appeared.

At the top of the sheet, add your naming rules, such as using lowercase and hyphens instead of spaces. You can also keep a short list of approved values for common sources and mediums.

Tip: Add a row at the top of your sheet with approved values for common sources and mediums, such as instagram, newsletter, email, and social. Copying from that list is much safer than typing from memory every time.

You can build a UTM link two ways, and both get the same result. Pick whichever feels easier for you and your team.

Here are your options:

  • By hand: Add a question mark after your page address, then add each pair with an ampersand between them.
  • With a builder: Paste your page address into Google’s free Campaign URL Builder. Then “fill out all fields marked with an asterisk (*), and the campaign URL will be generated for you.”

For longer URLs, the builder is usually the easier option because it reduces the chance of missing a character or formatting something incorrectly.

And don’t worry if the final link looks a little wild. In most emails, social posts, and buttons, your audience sees the linked text or CTA, not the full URL.

Step 5: Turn on automatic tagging if your tool supports it

If you send a lot of emails or texts, adding UTM codes to every link by hand can get tedious. Many marketing platforms can handle some or all of that tagging automatically, although the setup varies by tool.

In Constant Contact, for example, go to Settings, locate UTM tracking, and turn the feature on. You can choose which UTM parameters to include and set values for campaigns and automations. 

Constant Contact’s UTM tracking settings let you choose which parameters to add and preview the tagged URL before saving.
Constant Contact’s UTM tracking settings let you choose which parameters to add and preview the tagged URL before saving. Image source: Constant Contact

If you use another platform, check its campaign or analytics settings for UTM tracking options. The goal is the same: automate repetitive tagging while keeping your naming consistent.

Before using the link in a live campaign, test it end to end:

  • Open the tagged link in a new tab: Make sure the right page loads and the UTM parameters still appear in the address bar.
  • Check the values: Scan the URL for the source, medium, and campaign names you intended to use. A typo like instgram instead of instagram will create a separate entry in your reports.
  • Open Google Analytics: Go to Reports > Realtime and look for the visit you just created.
  • Confirm the traffic details: Check that the source, medium, or campaign matches the values in your tagged link.
  • Fix anything that looks off before you send: Once people start clicking, you can’t clean up those old visits retroactively.

If your marketing platform gives you a preview, check that too. Constant Contact’s Generated URL Preview, for example, lets you review the final tagged URL before you save your settings.

Step 7: Read your results in Google Analytics

Once your campaign starts getting clicks, open the Traffic acquisition report in GA4. In most accounts, you’ll find it under Reports > Acquisition > Traffic acquisition. Then use the dimension dropdown above the first column to choose what you want to compare, such as:

  • Session source/medium: Which sources and channels brought people to your site, such as newsletter/email or instagram/social.
  • Session campaign: Traffic generated by the same campaign across different channels.

For example, if you used holiday-menu as the campaign name in both your newsletter and Instagram post, the campaign report lets you see how those efforts performed together.

Give your campaign enough time to collect meaningful data before drawing conclusions. And if you want more help turning those numbers into useful decisions, check out this guide to reporting and analytics.

How to use UTM codes on your marketing channels

Start with the channels you already use every week, then add the rest. Each one needs slightly different labels.

Email newsletters

UTM codes can help you connect email clicks with what people do after they reach your site.

For most newsletters, use email as the medium and a consistent source such as newsletter. Then change the campaign value for each promotion.

For example:

  • utm_source=newsletter&utm_medium=email&utm_campaign=holiday-menu

Want to compare two links in the same email newsletter? Add utm_content. You could use top-button for your main CTA and footer-link for a link near the bottom. That way, you can see which placement drove more traffic.

Text messages

For text campaigns, keep your setup simple. Use sms as the medium and stick with the same source value across your sends.

For instance:

  • utm_source=sms-list&utm_medium=sms&utm_campaign=holiday-sale

When you send a new promotion, keep the source and medium the same and update the campaign name. That makes it easier to compare one text campaign with another without creating a pile of slightly different source names.

Social media posts

Social gets a little more detailed because you may post across several platforms and pay to promote some posts.

Use the platform as your source, such as instagram, facebook, or linkedin. Then use the medium to distinguish between organic and paid traffic.

Here’s how to separate them:

  • Organic Instagram post: utm_source=instagram&utm_medium=social &utm_campaign=holiday-menu
  • Paid Instagram ad: utm_source=instagram&utm_medium=paid-social &utm_campaign=holiday-menu

Keep the same platform name wherever you use it, including links in your bio. That makes your social traffic much easier to compare later.

Flyers, signs, and QR codes

UTM codes aren’t limited to digital campaigns. You can also add a tagged link to a QR code and use it to measure traffic from printed materials.

Say you’re promoting the same offer on a flyer at your front counter and another at a farmers market. Give each placement its own source so you can tell them apart:

  • utm_source=front-counter&utm_medium=print&utm_campaign=holiday-menu
  • utm_source=farmers-market&utm_medium=print&utm_campaign=holiday-menu

Before printing anything, scan the QR code yourself, open the page, and check that the UTM values appear correctly. Catching a typo now is much easier than reprinting a stack of flyers.

Partners and local sponsors

If another business or organization shares your link, give that partner their own source value. This lets you see which relationships are actually sending visitors your way.

For example, a food bank promoting its Giving Tuesday campaign through a local café could use:

  • utm_source=main-street-cafe&utm_medium=referral&utm_campaign=giving-tuesday

If several partners are promoting the same campaign, keep the campaign name the same and change only the source. Then you can compare how much traffic each partner contributed.

What to check in your UTM reports

You don’t need to comb through every row in Google Analytics to get something useful from your UTM data. A quick weekly check and a slightly deeper monthly review is usually enough to spot what’s working and catch tracking issues early.

Every week

Spend a few minutes checking:

  • Campaign traffic: Did this week’s email, text, or social post send people to the page you expected?
  • Tracking mistakes: Look for values like (not set), duplicate names, or obvious typos. If you spot one, fix your naming sheet before the next campaign goes out.

Every month

Set aside a little more time for the bigger picture:

  • Source and medium comparison: Look at which channels brought visitors who stuck around, even if they didn’t bring the most.
  • Actions by source: Compare signups, bookings, purchases, or donations by source, since a channel with fewer visits can still win.
  • New sources to watch: Keep an eye on visits from AI tools like ChatGPT, which Google Analytics now groups in an AI Assistant channel.

UTM data tells you where visits came from. To decide whether those visits mattered, pair it with the marketing metrics every small business tracks.

Common UTM code mistakes to avoid

As you get started, you might hit a few bumps. It happens to everyone! Here are the slips behind the messiest reports, and how to fix each one.

  • Adding UTM codes to links between pages on your own website. Use UTM codes only on links that bring people to your site from somewhere else, such as emails, texts, social posts, ads, or printed materials. They’re meant to track how someone arrived, not what they clicked next.
  • Mixing uppercase and lowercase values. Stick to lowercase every time. Google Analytics can treat Facebook and facebook as separate values, which splits your data across multiple rows.
  • Swapping source and medium. Think of source as where the visit came from, such as instagram or newsletter, and medium as the type of channel, such as social or email. If you’re unsure, check the naming sheet you created earlier.
  • Making up new names as you go. Reuse the values in your naming sheet instead of typing from memory. That keeps one source from turning into instagram, insta, and ig across three different campaigns.
  • Tagging every link but never checking the results. Set aside a few minutes each month to review your UTM reports. Even one useful takeaway — like finding that texts drive more class signups than Instagram — can help you decide where to focus next.

Put your UTM codes to work

Marvel’s Ultron may have wanted “no strings attached,” but your campaign links work better with a few. Those extra UTM tags help you see whether someone came from an email, text, social post, ad, or QR code.

Start with one campaign, keep your naming consistent, and check the results regularly. Over time, you’ll get a clearer picture of which channels bring people to your site and which ones deserve more of your attention.

And if tagging every link by hand sounds like one task too many, tools like Constant Contact can automate UTM tracking for your campaigns and automations. Start your free trial and see which emails and texts bring people back to your website.

FAQs

1. What is a UTM code?

A UTM code is a short piece of tracking information added to the end of a URL. It helps tools like Google Analytics show where website visitors came from, such as an email, social post, text message, or ad.

2. What does UTM stand for?

UTM stands for Urchin Tracking Module. Urchin was web analytics software that has since been discontinued.

3. Are UTM codes case-sensitive?

Yes, Google Analytics treats utm_source=Google and utm_source=google as two different values. Use lowercase everywhere to keep your reports clean.

4. What’s the difference between utm_source and utm_medium?

Source tells you where the visit came from, such as a newsletter or Instagram. Medium tells you the channel type, such as email or social.

5. What does utm_source=chatgpt.com mean?

It means the visitor clicked a link in a ChatGPT search answer. OpenAI’s publisher FAQ says, “ChatGPT automatically includes the UTM parameter utm_source=chatgpt.com in referral URLs.”

6. Are UTM codes still worth using?

Yes, for any link you share outside your website, since they’re the simplest way to see which email, text, post, or flyer sent each visit. They take seconds to add, especially if your email tool tags links for you.

Share with your network
Avatar photo

Marilia Dimitriou is a senior content writer and editor with 7+ years of experience in SEO content writing, editing, and digital marketing. She specializes in creating educational and product-led content for small businesses and marketing technology brands, with a focus on email marketing and automation.

Related Articles