How To Use UTM Codes To See Where Your Traffic Really Comes From

You are probably already sharing links everywhere: in newsletters, social posts, ads, partner content, and maybe even WhatsApp or SMS. Traffic shows up in Analytics, but the story is fuzzy: “social”, “email”, “direct” and “referral” do not really tell you which specific campaign did the work.

UTM codes fix that.

UTM parameters are small tags you add to the end of a URL. They tell your analytics tool exactly where a click came from: which channel, which campaign, sometimes even which ad or button. Used consistently, they turn “we think this worked” into “this campaign drove X clicks and Y conversions”.

In this extended version of the article, you will see what each UTM parameter means, how to build your first tracking links, a simple naming convention you can steal, how to read UTM data in GA4, and the most common mistakes to avoid.

If you’re creating and distributing content, you might want to know where your traffic is coming from, Are they coming to you from Facebook, email, a banner or some other channel? Using UTM codes in the links to your content allows you to determine the sources that generate traffic with extreme precision. You’ll soon find out which campaign leads to the best results.

Why use UTM codes?

Google Analytics gives you a rough estimate of which channels generate the most visitors, even without using UTM codes. Go to Acquisition > All traffic > Channels on the Report page. This will show you how many visitors have come to you through Google, social media, or links from other sites. UTM codes, however, allow you to zoom in even further. You’ll be able to find out exactly where your visitors originate. This allows you to measure the success of specific social media posts: has your YouTube short or LinkedIn post actually resulted in any visitors?

Which UTM codes are available?

You add a UTM code (or ‘tag’) to the link to your content. Because you’re using an adapted URL, Google Analytics is able to determine and segment exactly where visitors are coming from. A UTM code consists of a maximum of five segments:

Segment Example
Campaign source – The source that sends traffic to your content utm_source=Facebook
Campaign medium – The medium on which your content is shared utm_medium=social media
Campaign content – What content are you sharing? (If you’re sharing a magazine at the page level, you can indicate this here.) utm_content= tips and tricks
Campaign term – Which ad, link, or button is involved? utm_term= banner
Campaign name – The name that allows you to recognize your campaigns utm_campaign= spring campaign

Adding UTM codes to the URL

Adding UTM codes to the URL

You can add the desired UTM codes to the referring URL. The only required codes are for source, medium, and name. The other codes are optional. The example below shows what a URL including codes looks like:

http://www.magazine.yourdomain.com/title/issue/tips%20and%20tricks?utm_source=Facebook&utm_medium=social%20media&utm_content=tips%20and%20tricks
&utm_campaign=spring%20campaign

This example in Google Analytics shows that visitors have come to your magazine through a Facebook post about tips and tricks that was part of a spring campaign.

Creating and shortening UTM URLs

You do not have to create a coded URL manually; this is easily done using the Google URL builder. A downside to UTM codes is that your URL becomes very long. However, that can also be easily remedied: shorten the link that you have generated with the URL builder by using bit.ly, goo.gl or another URL shortener.

Measuring the effect of banners and buttons

UTM codes allow you to tag all the traffic that you can control: for example if you’re sharing your content on Pinterest, LinkedIn, Twitter, other social media accounts or via email or a QR code. Using free QR codes, you can track offline-to-online engagement by embedding UTM parameters within QR codes, ensuring precise measurement of traffic sources

The UTM codes utm_term allow you to test exactly which button or banner on your website yields the most traffic. Consider using the following utm_term terms: website-button-top, website-button-bottom of website-banner-right-side.

Adding UTM tags to links on your website

Adding UTM tags to links on your website

UTM codes can of course be used for much more than just measuring inbound marketing traffic. You can also tag outbound traffic: traffic from your website to another location, for example in your link to pages where people can sign up for newsletters or events, or where they can make purchases. Tagging these links allows you to closely monitor their conversion. Are they producing the desired results? This yields more valuable insights that can lead to further optimization. Which page or button yields the most conversions?

Tip: be consistent in using UTM codes

You determine which names and words you use in your UTM codes. Do ensure that you keep a good overview of your codes. Be consistent. Create a document that includes all codes per channel and per type of content and make sure that all employees working with these codes have access to this document and use it.

Tagging + measuring = better campaigns

The combination of UTM codes and Google Analytics produces rock-solid metrics. Acquisition > Campaigns > All campaigns shows the exact number of visitors to your content for all tagged links including specific UTM codes. Do you get much traffic through LinkedIn or through Instagram? Does call-to-action A lead to more conversions in your content than call-to-action B? Test it, measure it, and draw your conclusions. You will instantly know how successful your campaigns are and how to optimize them for your next content pieces.

UTM Codes In Plain Language (With Example)

A UTM code is just a normal link plus extra information after a question mark.

Basic structure:

https://yourwebsite.com/landing-page?utm_source=instagram&utm_medium=social&utm_campaign=summer-launch

The important parts:

utm_source – who sent the traffic

Examples: google, facebook, instagram, newsletter, partner-x

utm_medium – how they got to you

Examples: email, social, cpc, affiliate, display

utm_campaign – why the link exists

Examples: summer-launch, black-friday-2025, product-a-retargeting

utm_term (optional) – keyword or audience name (often for paid campaigns)

Example: utm_term=crm-software

utm_content (optional) – ad, button, or creative variation

Examples: utm_content=blue-banner, utm_content=video-version-a

Analytics tools like GA4 read these parameters and show them in your Acquisition reports, so you can compare channels and campaigns side by side.

Step-By-Step – Build Your First UTM Tracking Link

Here is a fast way to go from “plain link” to “properly tagged link” for your next campaign.

Start with your clean URL

Example: https://yourwebsite.com/free-trial

Choose source, medium, and campaign

You are sharing this in your newsletter about a new feature:

utm_source=newsletter

utm_medium=email

utm_campaign=new-feature-launch

Use a URL builder (optional but helpful)

Open Google’s Campaign URL Builder or a similar tool and paste your URL plus parameters.

It will generate the full tracking link for you.

Add optional term and content if needed

Two CTAs in the same email? Use utm_content to distinguish them:

Button 1: utm_content=hero-button

Button 2: utm_content=footer-link

Test the link

Paste it into your browser.

Check that the page loads correctly and that the parameters are visible in the address bar.

Use it consistently

Every place you promote that campaign (email, social bios, QR codes) should use the same UTM version so your data is clean.

A Simple UTM Naming Convention You Can Steal

Most teams struggle not with adding UTMs, but with doing it consistently. Here is a lightweight convention you can adopt today.

1. Use lowercase only

utm_source=facebook (good)

utm_source=Facebook (creates a second “fake” source in reports)

2. No spaces – use hyphens

utm_campaign=summer-sale-2025

Avoid summer sale 2025 which becomes summer%20sale%202025 in URLs.

3. Standard values for medium

Pick a short list and write it down. For example:

email – all email campaigns

social – all organic social posts

cpc – all paid search and paid social

affiliate – affiliate links

referral – partner placements you control

4. Source = platform or partner, not campaign type

Good: utm_source=facebook + utm_medium=cpc

Confusing: utm_source=facebook-ads

5. Campaign = marketing initiative, not channel

Good: utm_campaign=product-launch-q1, utm_campaign=black-friday-2025

Not great: utm_campaign=facebook-ads or utm_campaign=email

6. Keep a shared spreadsheet

Create one simple sheet with columns like:

Campaign name

Start date

utm_source

utm_medium

utm_campaign

Notes / links

This becomes your team’s “UTM bible” and stops everyone from inventing new names every week.

Where To See UTM Data In GA4

Where To See UTM Data In GA4

Once your links are out in the wild, you probably want to know where to look in Google Analytics 4.

Traffic acquisition report

In GA4:

Go to Reports → Acquisition → Traffic acquisition

Use the dropdown to choose:

session source / medium

session campaign

Here you will see sessions grouped by your UTM values.

User acquisition report

Useful if you want to understand new users only:

Reports → Acquisition → User acquisition

Look at first user source / medium or first user campaign.

Add conversions to the same view

In each report, add columns for your key events (for example, purchase, lead_submitted, sign_up).

Now you are not just seeing traffic, but which sources and campaigns drive real results.

Explore deeper if needed

If you want more detail (like utm_content or utm_term), use Explore → Free form and pull in the corresponding dimensions.

Common UTM Mistakes (And How To Avoid Them)

Even experienced marketers trip over the same UTM problems. Here are the big ones to watch out for.

Tagging internal links

Never add UTMs to links that go from one page on your site to another. This overwrites the original source and breaks attribution. Keep UTMs for links coming from outside your site only.

Mixing cases and spelling

utm_source=Google and utm_source=google show up as two separate sources. Same with utm_medium=paid-social vs utm_medium=paid_social. Pick one and stick with it.

Using medium for random info

Medium should describe the channel type (email, social, cpc). Do not stuff it with creative names like utm_medium=blue-banner or utm_medium=homepage-cta. Use utm_content for that.

Campaign names that are too long

If your campaign name is a full sentence, it will be hard to read in Analytics. Keep it short but descriptive, like brand-awareness-q1 or spring-sale-eu.

No documentation

If everything lives in someone’s head (or in one random Notion page), data gets messy as soon as more people start creating links. That shared spreadsheet from earlier is your safety net.

Forgetting to tag owned traffic

A lot of people tag ads and forget organic newsletters, social bios, or partner blogs. If you control the link, you can usually tag it. The more links you tag, the better your picture of where traffic comes from.

Using StoryLab.ai To Create Better, Consistent UTM Campaigns

UTM tracking is as much a content problem as it is a technical one. You need clear, consistent names that still make sense six months from now.

Here is how StoryLab.ai can help:

Name campaign themes clearly

Feed your campaign brief into StoryLab.ai and ask for several concise campaign name ideas.

Pick one, then convert it into a clean UTM campaign value (lowercase, hyphens).

Generate consistent variations

Once you decide on a pattern like goal-audience-timeframe, use StoryLab.ai to generate multiple options:

lead-gen-smb-q1, lead-gen-enterprise-q1, retention-existing-customers-q2.

Document naming rules

Turn your conventions into a one-page internal guide with examples.

Use StoryLab.ai to rewrite it in clear language so everyone in the team understands it.

Create training and onboarding content

Build quick guides or checklists (“5 rules for UTMs in our team”) that you can share with agencies and new hires.

The more consistent your wording, the cleaner your analytics will be – and the easier it becomes to see which stories, offers, and channels actually move the needle.

FAQ

What are UTM codes in simple terms?

UTM codes are small pieces of text you add to the end of a link (like ?utm_source=instagram&utm_medium=social). They tell your analytics tool where that click came from so you can see which campaigns actually send visitors and conversions to your site.

Which UTM parameters are required?

You should always use at least:

utm_source (who sent the traffic)

utm_medium (which type of channel)

utm_campaign (which marketing initiative)

utm_term and utm_content are optional, but very helpful for paid campaigns and A/B tests.

Do UTM codes affect SEO or how pages rank in Google?

No. UTM parameters do not change the content of the page and are ignored by search rankings. They only affect how traffic is labelled in your analytics. You can safely use them in campaigns without worrying about hurting SEO.

Should I use UTM codes on every single link?

Use them on any link you control that sends people from another channel or platform to your site: emails, social posts, ads, partner articles, QR codes. Do not use them on internal links between pages on your own site.

How do I keep my UTM setup consistent across a team or agency?

Agree on a simple naming convention (lowercase, no spaces, standard mediums).

Keep a shared spreadsheet of campaigns and UTM values.

Use a standard URL builder for everyone.

Do quick quarterly audits of your GA4 reports to spot messy values.

Where do I see UTM data in Google Analytics 4?

In GA4, go to Reports → Acquisition → Traffic acquisition and select session source / medium or session campaign. For new users only, use User acquisition. You can also build custom Explore reports if you need more detail.

What are UTM codes?

UTM codes are snippets of text added to the end of a URL to help marketers track the performance of campaigns and content. They provide Google Analytics and other analytics tools with information about how visitors are coming to your site.

Why are UTM codes important for digital marketing?

UTM codes are important because they allow marketers to track the effectiveness of specific campaigns across various channels. By analyzing this data, marketers can understand which strategies are working, optimize their marketing efforts, and improve ROI.

What information can UTM codes track?

UTM codes can track five types of information: source (utm_source), medium (utm_medium), campaign (utm_campaign), term (utm_term), and content (utm_content). This allows for detailed insights into how users are finding your website.

How do you create a UTM code?

You can create a UTM code manually by appending the UTM parameters to the end of a URL with the appropriate syntax, or you can use a UTM builder, like Google’s Campaign URL Builder, which simplifies the process.

Can UTM codes track offline campaigns?

Yes, UTM codes can track offline campaigns by using them in URLs that are redirected to from QR codes, printed materials, or other offline marketing materials. When users enter these URLs, the UTM data is captured by analytics tools.

Do UTM codes affect website SEO?

No, UTM codes do not affect website SEO. They are simply used for tracking purposes on the analytics side and do not influence a website’s ranking in search engine results pages (SERPs).

How should UTM codes be structured for clarity and effectiveness?

For clarity and effectiveness, UTM codes should follow a consistent naming convention that clearly identifies the campaign, source, and medium. Avoid using spaces (use underscores or dashes instead), and be descriptive yet concise.

Can UTM parameters be used in social media marketing?

Absolutely, UTM parameters are especially useful in social media marketing to track how different content performs across platforms, what drives traffic to your website, and which messages resonate best with your audience.

How can you ensure accuracy when using UTM codes?

Ensure accuracy by double-checking the syntax and spelling of your UTM parameters, using a UTM builder tool to avoid errors, and maintaining a standardized naming convention across all campaigns.

Are there any best practices for managing UTM codes?

Best practices include using a consistent naming convention, keeping a centralized document of all UTM-tagged URLs for reference, using URL shorteners for cleaner links, especially in social media, and analyzing your analytics regularly to adjust campaigns based on performance data.

You might also like:

Author bio

Ritesh SheombarRitesh is a digital marketing manager with years of experience in driving growth. He’s currently the director of inbound marketing at Foleon. You can find more about him on his LinkedIn profile.

Master the Art of Video Marketing

AI-Powered Tools to Ideate, Optimize, and Amplify!

  • Spark Creativity: Unleash the most effective video ideas, scripts, and engaging hooks with our AI Generators.
  • Optimize Instantly: Elevate your YouTube presence by optimizing video Titles, Descriptions, and Tags in seconds.
  • Amplify Your Reach: Effortlessly craft social media, email, and ad copy to maximize your video’s impact.