Build a UTM tracking URL in seconds
Paste your destination URL, fill in a few fields, and this UTM builder hands you a ready-to-use campaign tracking link. No spreadsheets, no manual typing, no typos breaking your analytics.
Every link you create tells Google Analytics (or any compatible analytics platform) exactly where a click came from — which channel, which campaign, and even which ad or button. That means you stop guessing and start knowing what's actually driving traffic.
How to use the UTM builder
- Enter your destination URL — the page you want to send visitors to (e.g.
https://example.com/pricing). - Fill in Source — where the traffic is coming from (e.g.
newsletter,google,linkedin). - Fill in Medium — the marketing channel type (e.g.
email,cpc,social). - Fill in Campaign — a name for this specific campaign (e.g.
summer-sale-2025). - Optionally add Term and Content — useful for paid search keywords and A/B testing different ads.
- Copy your generated URL and use it anywhere you share a link — email, ads, social posts, QR codes.
What each UTM parameter does (quick reference)
Here is a real example URL and what each part means. This is the format every UTM link generator produces:
https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=summer-sale-2025&utm_term=cloud+software&utm_content=header-cta| Parameter | Example value | What it tells your analytics |
|---|---|---|
| utm_source | newsletter | The specific place sending the traffic (a publication, site, or app) |
| utm_medium | email | The channel type — email, cpc, social, banner, etc. |
| utm_campaign | summer-sale-2025 | The campaign name so you can group all its traffic together |
| utm_term | cloud+software | The paid keyword that triggered the ad (mostly for Google Ads) |
| utm_content | header-cta | Which version of an ad or link was clicked — great for A/B tests |
Worked example: an email campaign link
Say you're sending a promotional email for a summer sale and linking to your pricing page. You want to know how many sign-ups come from that email specifically.
Your inputs:
- URL:
https://example.com/pricing - Source:
mailchimp - Medium:
email - Campaign:
summer-sale-2025 - Content:
blue-button
Generated UTM URL:
https://example.com/pricing?utm_source=mailchimp&utm_medium=email&utm_campaign=summer-sale-2025&utm_content=blue-buttonDrop that link into your email template. Inside Google Analytics, go to Acquisition → Traffic Acquisition and you'll see this campaign listed by name, showing sessions, conversions, and revenue — all tied to that one email.
How to build a UTM URL in code
Sometimes you need to generate campaign URLs programmatically — in a script, a CMS plugin, or an automation workflow. Here's how to do it properly in two common languages.
Python (uses the built-in urllib.parse module):
from urllib.parse import urlencode, urlparse, urlunparse
base_url = 'https://example.com/pricing'
params = {
'utm_source': 'mailchimp',
'utm_medium': 'email',
'utm_campaign': 'summer-sale-2025',
'utm_content': 'blue-button',
}
url_parts = list(urlparse(base_url))
url_parts[4] = urlencode(params)
tracking_url = urlunparse(url_parts)
print(tracking_url)
# https://example.com/pricing?utm_source=mailchimp&utm_medium=email&utm_campaign=summer-sale-2025&utm_content=blue-button
JavaScript (runs in Node.js or any modern browser):
const baseUrl = 'https://example.com/pricing';
const params = new URLSearchParams({
utm_source: 'mailchimp',
utm_medium: 'email',
utm_campaign: 'summer-sale-2025',
utm_content: 'blue-button',
});
const trackingUrl = `${baseUrl}?${params.toString()}`;
console.log(trackingUrl);
// https://example.com/pricing?utm_source=mailchimp&utm_medium=email&utm_campaign=summer-sale-2025&utm_content=blue-button
How it works
UTM parameters are plain query string values appended to any URL. When someone clicks your link, their browser sends the full URL — parameters included — to your destination page. Google Analytics (via the GA4 tracking script on the page) reads those values and logs them as the session's source, medium, and campaign dimensions.
The parameters don't change the page the visitor sees; they're invisible to visitors but fully visible to your analytics. Google's official guidance on UTM tracking is published in the Google Analytics campaign URL builder documentation.
When to use UTM parameters — and when to skip them
Use them when:
- You're sharing links in emails, newsletters, or SMS — traffic from these often shows as 'direct' in analytics without UTM tags.
- You're running paid ads on platforms that don't auto-tag (many social and display networks).
- You want to compare two versions of a CTA button or ad creative (use
utm_contentfor this). - You're sharing links in partner content, press releases, or influencer posts.
Skip them when:
- Linking between pages on your own site — internal UTM links overwrite the original referral source and corrupt your data.
- The ad platform already auto-tags clicks (Google Ads with auto-tagging on, for example — adding manual UTMs can conflict).
- The URL will be indexed by search engines; UTM parameters can create duplicate-content issues if not handled with a canonical tag.
Tips for keeping your UTM data clean
- Use lowercase everywhere. Analytics treats
Emailandemailas two different sources. Decide on a convention and stick to it. - Use hyphens, not spaces. Spaces get encoded as
%20or+, which looks messy in reports. Hyphens stay readable. - Keep a shared naming spreadsheet. Inconsistent campaign names —
spring_salevsSpring-Salevsspringsale— fragment your data across three rows instead of one. - Don't put personally identifiable information (PII) in UTM values. Analytics platforms are not designed to store names or email addresses in URLs.
Your privacy is protected: this tool runs entirely in your browser. No URLs, campaign names, or any other data you enter are sent to our servers or stored anywhere.
Ready to tag your next campaign? Use the UTM builder above to generate a clean tracking URL in under a minute.