UTM tags

Contents
What UTM tags are
The parameters
Examples
Where they show up
Rules

What UTM tags are

UTM tags (Urchin Tracking Module) are parameters added to a link to tell where a visitor came from: which site, which kind of advertising, which campaign. The name comes from Urchin, a web analytics company that Google bought in 2005 and turned into Google Analytics.

Technically they are ordinary query parameters after the ? of a URL. The page itself ignores them; the analytics script on the page reads them.

The parameters

Five classic parameters, in any order:

ParameterTellsExample
utm_sourceThe site or service the visitor came fromutm_source=newsletter
utm_mediumThe kind of channel: paid click, email, socialutm_medium=cpc
utm_campaignThe campaignutm_campaign=spring_sale
utm_termThe paid search keywordutm_term=running+shoes
utm_contentWhich link or banner was clicked, to tell apart links in the same ad or emailutm_content=logolink

Google Analytics 4 also reads utm_id, utm_source_platform, utm_creative_format and utm_marketing_tactic.

Examples

Two tags, for a link in a newsletter:

https://www.example.com/spain/?utm_source=newsletter&utm_campaign=web_utm

All five, for a link posted in a social network by a scheduling tool:

https://www.example.com/bikes/?utm_source=example.org&utm_medium=social&utm_campaign=buffer&utm_content=buffercf3b2&utm_term=city+bike

Spaces and other special characters in a value must be encoded, as + or %20; see URL encoding.

Where they show up

Google Analytics, Yandex Metrica and most other analytics tools read the tags and build reports by source, medium and campaign; with goals they show which campaign brings the visitors that buy, see Yandex Metrica: goals.

The tags also stay in the request line of the web server log, so they can be counted without any analytics. On a typical Linux server with Nginx:

grep -o 'utm_source=[^& ]*' /var/log/nginx/access.log | sort | uniq -c | sort -rn

Rules

Article authors: Andrei Olegovich, Klavdiya Kondakova

Related articles
Responsive design: an adaptive menu
Beget mail: create a mailbox
Canonical page: rel=canonical
CSS
Firefox
Which hosting to choose
VPS hosting
HTTP status codes
Joomla
OpenCart
PUT vs POST
Redirects
Russian IP ranges
SEO
Element tbody not allowed as child of element table in this context
CSS test: shapes and line numbers
CSS test 2: the code blocks of this site
Website testing
A tram drawn with CSS
URL encoding
UTM tags
Telling bots from people
WebP images
Moving a website: domain and hosting
WordPress
Move a WordPress site
Yandex Metrica: goals
Yandex Mail: collect mail from other mailboxes

Search this site

Channel @aofeed Chat @aofeedchat

Contacts and cooperation:
I recommend our hosting beget.com
Write to info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: