Himanshu SharmaSoftware engineer
Let’s talk

Digital Marketing · Lesson 20 of 28

UTM tagging: naming your campaign links

Learn the five UTM parameters, build a consistent naming scheme, tag links in email, social, ads, QR codes and partners, and avoid common tagging errors.

12 minAnalytics and measurementUpdated 14 November 2026

Awaiting technical review. This lesson is readable but not yet listed in search engines.

By the end of this lessonBuild correct UTM-tagged links with a consistent naming convention, encode special characters, and know where tagging helps and where it can mislead.

The problem UTM tags solve

Someone visits your site. Analytics usually knows a little about where they came from, such as a search engine or another website, but not always. Visits from an email, a QR code or a private message often appear as "direct", which hides your effort. A UTM tag is a few words added to a link's address so analytics can record where that specific click came from.

The name comes from "Urchin Tracking Module", from the software that Google Analytics grew out of. You only need the idea: tags in the web address, readable by analytics.

The parameters

Google Analytics help documents these parameters for campaign URLs (as read in 2026-11).

Parameter Meaning Example value
utm_source Where the traffic comes from: a site, a newsletter, a billboard newsletter
utm_medium The marketing channel, such as email or paid click email
utm_campaign The overall effort or promotion spring-sale
utm_id A campaign identifier, matching ids you use when importing campaign data sp2026
utm_term The paid keyword maths-tutor
utm_content Distinguishes versions or links, such as two buttons in one email top-button

In practice, most small businesses use the first three, plus utm_content when comparing versions.

A tagged link:

text
https://example.com/trial/?utm_source=newsletter&utm_medium=email&utm_campaign=spring-trial&utm_content=top-button

The tags come after a ?, separated by &. The page content does not change. Your analytics tool reads the tags when the visit arrives.

Choose a naming convention

Google's help states that values are case sensitive and recommends a strict, consistent convention, with lowercase as standard practice. If one person writes Email and another email, reports show two rows. Agree rules and write them in a shared sheet.

text
Rules (fictional business)
1. Everything lowercase.
2. Words separated by hyphens, never spaces.
3. medium from this list: email, social, cpc, referral, print, partner
4. source is the specific place: newsletter, instagram, flyer, notice-board
5. campaign = what we are promoting + month: spring-trial, diwali-gifts-oct
6. content only when two links in the same message need telling apart

A small spreadsheet where each link is logged (date, destination, tags, owner) prevents duplicates and lets you check results later.

Build and encode

Because the tags sit in a web address, special characters must be encoded: a space becomes %20, & becomes %26. The easiest approach is to avoid them entirely by using lowercase words and hyphens. If you need unusual characters, the URL Encoder shows the encoded form of a value, for example "spring sale" becomes spring%20sale.

For printed pieces, turn the tagged link into a code with the QR Code Generator, and test before printing (offline lesson). Long tagged links make denser codes, so keep values short.

You can check a link in a browser example. This one just shows the structure by splitting a tagged address.

html
<script>
  const url = new URL("https://example.com/trial/?utm_source=newsletter&utm_medium=email&utm_campaign=spring-trial");
  const out = [...url.searchParams].map(([k, v]) => k + " = " + v).join("\n");
  document.write("<pre>" + url.pathname + "\n" + out + "</pre>");
</script>

Where to use tags

  • Email: tag links in each newsletter, with the campaign name per send.
  • Social profiles and posts: one tagged link in your bio per platform, plus campaign links in posts.
  • Paid ads: many ad platforms can add tracking parameters automatically, and Google Ads has its own auto-tagging; read how it interacts with your manual UTM tags before combining.
  • Partners and referrals: a link per partner.
  • Printed material and QR codes: one per piece or location.

Where not to use tags

  • Links between pages of your own site. Tags on internal links can start a new session or overwrite the true source in reports. Use events for internal clicks instead.
  • Links where the source is already obvious, such as from a search engine result you did not tag.
  • Anywhere personal data could appear. Never put an email address or name in a tag; web addresses are logged and shared.

Reading the data

In Google Analytics, traffic acquisition reports show source, medium and campaign dimensions. Tagged visits are a minimum: people who forwarded your email, copied the link without tags or came back later by typing your address will not carry the tag. Treat the numbers as indications, a point discussed in attribution and privacy.

Common mistakes

  • Mixed capitalisation. One channel becomes five.
  • Tags on internal links. They distort your sources.
  • Personal data in tags. A privacy risk.
  • Not logging links. Nobody remembers what utm_campaign=test2 meant.
  • Vague names. "campaign1" is useless in six months.

Exercise

Write a tagged link for a fictional bakery's flyer left at offices, with convention-following values, and explain each tag.

Show one possible answer
text
https://example.com/catering/?utm_source=flyer&utm_medium=print&utm_campaign=office-lunch-spring&utm_content=a5-offices

source is the specific origin (a flyer), medium is the channel type (print), campaign names the promotion and season, and content separates this flyer version from, say, a poster. All values are lowercase with hyphens, so no encoding is needed.

Key points

  • UTM parameters are query-string tags that tell analytics where a visit came from.
  • Google Analytics help describes utm_source, utm_medium, utm_campaign, utm_id, utm_term and utm_content, and notes that values are case sensitive.
  • Choose a lowercase naming convention and write it down, because inconsistent names split one channel into many rows.
  • Do not use UTM tags on links between pages of your own site, and never put personal data in them.

Check yourself

1. Which UTM parameter is meant to describe the marketing channel, such as email or cpc?
2. Why is utm_source=Newsletter different from utm_source=newsletter in reports?
3. Which is a mistake?

Free tools for this lesson