UTM campaign URL builder
Add campaign parameters to an HTTP(S) URL while preserving existing query parameters.
Input
Tip: press Ctrl + Enter to run
Saved settings
About this tool
UTM parameters tell analytics tools where a visit came from: which newsletter, which social post, which ad. Without them, many campaign clicks show up as "direct" or "referral" and you cannot tell what worked. This builder adds utm_source, utm_medium and utm_campaign to a web address, keeping any parameters the address already has.
Consistency matters more than the exact words. Decide on lowercase names such as "newsletter" and "email" and use them every time, because analytics treats "Email" and "email" as different mediums.
How to use it
- Paste the full landing page address, starting with https://.
- Enter the source (where the link is placed, e.g. facebook or newsletter).
- Enter the medium (the type of channel, e.g. email or paid_social) and the campaign name.
- Build the link and use it wherever you publish the campaign.
How the calculation works
The address is parsed with the browser’s URL parser. utm_source, utm_medium and utm_campaign are set (replacing any existing values for those keys) and other parameters are preserved. Empty fields are skipped. Addresses must be http or https without embedded user names or passwords.
URL + utm_source + utm_medium + utm_campaignWorked example
For a Black Friday ad on Facebook pointing to https://shop.example.com/sale?ref=home, entering source facebook, medium paid_social and campaign black_friday_2026 produces https://shop.example.com/sale?ref=home&utm_source=facebook&utm_medium=paid_social&utm_campaign=black_friday_2026. The existing ref=home is kept.
Sample input and result
?utm_source=newsletter&utm_medium=email&utm_campaign=launch
Limitations
- Source, medium and campaign only.
- Does not shorten links.
- Requires a full http or https address.
Last updated:
Frequently asked questions
Which mediums does Google Analytics recognize?
GA4 groups traffic into default channels using medium values such as email, cpc, paid_social, organic_social, affiliate and referral. Using these helps channel reports.
Should I add UTMs to internal links?
No. UTMs on links within your own site start new sessions and distort reports.
What about utm_term and utm_content?
They are optional and not built here; add them by hand if you test different ads or keywords.
Troubleshooting
It asks for a complete web address.
Include https:// at the start; "example.com/page" alone is not a full address.
Visits still show as direct.
Some apps strip parameters or open links in a way that loses them. Check the landing page URL after clicking.
Campaigns are split into several rows in analytics.
Capitalization or spelling differs between links. Standardize names.
Privacy & Free to use
Are my inputs stored?
Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.
Is this tool free?
Yes. No signup or payment is required.
See also
Useful next steps
JSON formatter & validator
Validate, pretty-print or minify JSON locally. Invalid data is never sent to a server.
Developer & SEOCSV to JSON converter
Convert CSV headers and records to JSON, supporting quoted delimiters and line breaks.
Developer & SEOJSON to CSV converter
Convert a flat array of objects to CSV. Formula-like strings receive a protective prefix for spreadsheet imports.
Developer & SEO