How to build a UTM link
By Flavio
Add source, medium, and campaign parameters to a URL, and see how spaces, mixed case, and a missing protocol come out in the link.
Free toolThis tutorial uses the UTM Link Builder. It runs in your browser, so open it in another tab and follow along.
A UTM link is a normal URL plus campaign parameters. Analytics reads them and attributes the click. Plausible checks utm_source before it falls back to the referrer, which is the order in how Plausible Analytics is built.
The UTM link builder writes the URL in the browser. Nothing is uploaded.
The five parameters
utm_source is where the click came from. utm_medium is the channel. utm_campaign is the effort you want to count. utm_term and utm_content are optional. Term is a paid keyword. Content separates two links in the same email.
Keep the values lowercase, and skip spaces. The tool warns when you do otherwise, and it still builds the URL.
Build one
Base URL https://flaviocopes.com/tools/. Source newsletter. Medium email. Campaign tools-november. Leave term and content empty.
The tool writes:
https://flaviocopes.com/tools/?utm_source=newsletter&utm_medium=email&utm_campaign=tools-november
No warning. The three required fields are set, and each value is already lowercase.
What the warnings look like
The same page with source Newsletter and campaign tools november still builds a URL. The space becomes a plus, and two warnings appear.
https://flaviocopes.com/tools/?utm_source=Newsletter&utm_medium=email&utm_campaign=tools+november
utm_source has mixed case — lowercase is recommended for consistent analytics.
utm_campaign contains spaces — they will be URL-encoded.
| What you type | URL the tool writes | Warning |
|---|---|---|
source newsletter, campaign tools-november |
https://flaviocopes.com/tools/?utm_source=newsletter&utm_medium=email&utm_campaign=tools-november |
none |
source Newsletter, campaign tools november |
https://flaviocopes.com/tools/?utm_source=Newsletter&utm_medium=email&utm_campaign=tools+november |
mixed case, and a space that is encoded |
base https://flaviocopes.com/tools/?utm_source=old |
the same newsletter URL, with old gone |
the existing utm_source is overwritten |
base flaviocopes.com/cron/, content footer |
https://flaviocopes.com/cron/?utm_source=newsletter&utm_medium=email&utm_campaign=cron-guide&utm_content=footer |
https:// was added |
| source, medium and campaign empty | https://flaviocopes.com/ |
each of those three fields is empty |
The overwrite row uses the same source, medium and campaign as the first row. The builder replaces utm_source=old. It does not keep both. The URL is the newsletter link above, and the page adds this warning:
Base URL already has UTM params (utm_source) — they will be overwritten.
A base with no protocol gets https:// in front. flaviocopes.com/cron/ with source newsletter, medium email, campaign cron-guide, and content footer becomes:
https://flaviocopes.com/cron/?utm_source=newsletter&utm_medium=email&utm_campaign=cron-guide&utm_content=footer
Base URL is missing a protocol — https:// will be assumed.
utm_content=footer is on that URL because content was filled in. Term stays off the URL when the field is empty.
Leave source, medium, and campaign empty on https://flaviocopes.com/ and the URL stays https://flaviocopes.com/. The page warns about each empty field:
utm_source is empty — add a traffic source.
utm_medium is empty — add a channel.
utm_campaign is empty — add a campaign name.
When you reach for it
You have one page and two places that link to it, a newsletter and a footer. Give them the same source and campaign, and a different utm_content, so the report can split the clicks.
Paste a URL that already has UTM parameters and the tool tells you which ones it will replace. Fix the values before you copy the link into the email.
Try the UTM Link Builder
Build campaign URLs with utm_source, medium, and campaign — presets, validation warnings, and a parameter reference.
Related tools
- URL Parser & Builder: Paste a URL to see every part labeled — protocol, host, path, query params, hash. Edit any piece and copy the result.
- Slug & Headline Case Converter: Slugify any headline for URLs and convert between title case, sentence case, and more — AP and Chicago styles included.
- Encode / Decode: Encode or decode Base64, URL components, and HTML entities in your browser. Unicode-safe Base64 included.
Want me to talk about your product? You can sponsor this site.