UTM link builder
UTM link builder
Add campaign parameters to a URL with the values encoded properly, keeping any query string and fragment already on the link intact.
How this is calculated
The destination is parsed, existing query parameters are preserved, and each supplied utm value is percent-encoded as a query component before being appended. The fragment stays at the end. Values are lowercased and spaces turned to hyphens when you choose that convention.
- Case matters. utm_source=Newsletter and utm_source=newsletter are two different sources in a report, which is why the convention is a choice on the form rather than something applied silently. Pick one and keep it across every link the team builds.
- Never tag internal links. A campaign parameter on a link between two pages of your own site starts a new session in most analytics packages and overwrites the original source, so the traffic you were trying to measure disappears.
- These parameters are visible to anyone who sees the link and are frequently stripped by privacy tools and link shorteners. They are a reporting convention, not a tracking guarantee.
- An existing utm parameter on the destination is replaced rather than duplicated, because two values for one key leave the choice to the analytics parser.
A campaign parameter is a reporting convention, and conventions only work when everyone keeps them. The most common way UTM tracking fails is not a broken link — it is two people spelling the same source differently.
Case and vocabulary are the whole problem
utm_source=Newsletter and utm_source=newsletter are two different sources in a report. The same applies to email versus e-mail versus Email, and to a campaign named one way in January and another way in February. That is why the case convention is an explicit choice on this form rather than something applied silently, and why the medium vocabulary should be agreed before the first link is built.
Values are percent-encoded as query components, so a space or an ampersand in a campaign name does not break the URL. Any query string and fragment already on the destination are preserved, and an existing utm parameter is replaced rather than duplicated, because two values for one key leave the choice to the analytics parser.
Never tag an internal link
A campaign parameter on a link between two pages of your own site starts a new session in most analytics packages and overwrites the original source. The traffic you were trying to measure disappears into a self-referral, and the report shows your own site sending you visitors.
These parameters are visible to anyone who sees the link and are frequently stripped by privacy tools, browser features and link shorteners. They are a convention for your own reporting, not a tracking guarantee, and a share of tagged clicks will arrive untagged no matter how carefully the link was built.
Questions readers ask
Which parameters are required?
source, medium and campaign are the three every analytics package expects. term and content are optional and are used for paid keywords and for distinguishing variants of the same link.
Should I use a link shortener on top?
Only if it preserves the query string through the redirect. Many strip or rewrite parameters, which silently removes the tracking you just built. Test the final destination, not the short URL.
More in Markup, feeds and tagged links
SEO and website tools
Titles and snippets measured, copy counted and scored, and the markup a page needs built in the browser and copied out.
- robots.txt generator Build a robots.txt from the paths you want crawled and the ones you do not, with your sitemap declared and the rules ordered so a specific allowance is not swallowed by a broad block.
- XML sitemap generator Turn a list of URLs into a valid urlset sitemap, with duplicates removed, XML escaping applied and the protocol limits checked against what you pasted.
- Schema markup generator Build JSON-LD for a website, an organisation, an article or a breadcrumb trail from fields you fill in, with the properties each type requires present before the block is written.
- FAQ schema generator Turn question and answer pairs into FAQPage JSON-LD, with the answers kept as the text a reader can already see on the page.
- Hreflang tag generator Build the alternate-language link set for a page, including the x-default entry, from the language and region codes and URLs you supply.
- Open Graph and Twitter card generator Build the Open Graph and Twitter card meta tags for a page, with the image dimensions you supply deciding which card type is honest to claim.
- UTM link builder Add campaign parameters to a URL with the values encoded properly, keeping any query string and fragment already on the link intact.
