30% off your first 3 months

Get the deal

Tracking links with UTM parameters

by DuckyHelperNov 12, 20264 min read
Getting work done

TL;DR:

  • UTM parameters are labels added to the end of a link, so your analytics can tell which source, medium and campaign sent each visit.

  • Use utm_source for where it came from, utm_medium for the type of channel, and utm_campaign for the effort.

  • Pick lowercase names, write them in a shared list, and reuse them exactly. Inconsistent naming splits one campaign into many rows.

You send a newsletter, post on social media and put a link on a poster. A week later the website shows a jump in visits, and nobody can say which of the three caused it. Without a label on each link, all those visits look the same.

UTM parameters are the usual fix. They are small text labels added to the end of a web address. When someone clicks, the analytics tool on your site can read the labels and sort the visit into the right group. You build them once and paste the tagged link where it belongs.

Tag links that you control and place on other places: email, social posts, posters with a QR code, partner pages and ads. Do not tag links between pages of your own site. A visitor who clicks a tagged internal link can start a new session in some analytics setups and overwrite where they originally came from.

What the three main labels mean

  • utm_source: where the visit came from, such as the name of the newsletter or the site.

  • utm_medium: the kind of channel, such as email, social or poster.

  • utm_campaign: the named effort the link belongs to, such as spring_sale.

Two more are optional. utm_term is used for paid search keywords and utm_content tells apart two links in the same message, such as a header button and a footer link. Start with the first three. Your analytics tool's own help page shows exactly how it reports them, so check there for the names it uses.

Take the plain address, add a question mark, then add each label as name=value, separated by ampersands. If the address already contains a question mark, start your labels with an ampersand instead. Spaces are best avoided; use underscores or hyphens.

https://example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale

If the address ends in a # section, the labels go before the # part. Many web forms and link-building pages do this for you, but you should know the shape so you can spot a mistake.

You write the November newsletter and it links to a page about your winter menu at https://example.com/winter-menu. The same page is also promoted on social media, so you want to see which brings more visits.

  1. Decide the three values: Source: newsletter. Medium: email. Campaign: winter_menu.

  2. Check the original address: https://example.com/winter-menu has no question mark, so your labels start with ?.

  3. Assemble the link: https://example.com/winter-menu?utm_source=newsletter&utm_medium=email&utm_campaign=winter_menu

  4. Make the social version: Change only what differs: utm_source=instagram and utm_medium=social, with the same utm_campaign=winter_menu.

  5. Click both once yourself: Confirm each opens the right page. Then check your analytics later, once real visits arrive, to see the labels appear.

Because the campaign name is the same, you can look at the winter menu campaign as a whole, and split it by source or medium to compare email with social. That is the benefit of three separate labels.

Consistent naming is the whole game

Analytics tools treat names as exact text. "Email", "email" and "e-mail" can show up as three different rows. Fix this with a naming rule and a shared list.

Label

Rule

Good

Avoid

utm_source

lowercase, one word per platform

newsletter

Newsletter, News Letter

utm_medium

from a short fixed list

email, social

e-mail, Social Media

utm_campaign

lowercase, words joined by underscores

winter_menu

Winter Menu!!

Keep a spreadsheet with a row per link: the plain address, the three values, the final tagged link, the date and where it was posted. It becomes the record you check when a number looks strange.

Mistakes to avoid

  • Tagging links inside your own website.

  • Mixing capital letters and lowercase between campaigns.

  • Putting personal details such as a customer's name or email address in a label. Links are visible and get shared.

  • Forgetting that a shared link carries its tags with it, so the labels describe where it was first posted and not where the later visitor found it.

  • Never opening the tagged link to check it works.

Doing it faster

Build the tagged link in a spreadsheet by joining text with a formula, so the labels come out identical each time. If the plain address is in A2, source in B2, medium in C2 and campaign in D2, then this formula assembles the link.

=A2&"?utm_source="&B2&"&utm_medium="&C2&"&utm_campaign="&D2

That formula assumes the address in A2 has no question mark already. If you are unsure of a step while building these, DuckyHelper can look at your sheet and talk it through with you.

Frequently asked questions

Do UTM labels change what the visitor sees?

The page looks the same. The labels are only read by the analytics tool, though the longer web address is visible in the browser bar.

Can I tag a QR code link?

Yes. A QR code just encodes a web address, so tag the address first and then make the code from the tagged link.

Get started

DuckyHelper can
do more

It sees your screen and works in any app you use. Try it for 10 minutes, no card.

Get it for Mac, Windows or Linux

Share

Questions and jobs

Do anything

Ask it a question or hand it a job, in any app.

Doing jobs for you is in early access on Mac. Asking works on Mac, Windows and Linux.