UTM Campaign URL Builder
Add campaign tags to a URL without breaking its query string.
Runs locally in your browser
Discuss a result
Write a short summary and review it before posting. Your tool inputs are never copied automatically.
What is the UTM Campaign URL Builder?
UTM parameters are short tags added to a link's query string, such as utm_source=newsletter and utm_medium=email, that tell analytics tools like Google Analytics where a visit came from. Without them, clicks from email, PDFs, QR codes, podcasts and many apps show up as direct traffic, and you cannot tell which campaign worked. Marketers, small business owners, creators sharing links in bios, and developers setting up campaign tracking all use them.
This builder takes a full http or https URL and adds up to five tags: utm_source, utm_medium, utm_campaign, and optional utm_term and utm_content. It uses the browser's URL API, so existing parameters such as ?ref=home are kept, special characters and spaces are encoded correctly, and a #section fragment stays at the end. If the URL already has a UTM tag, the new value replaces it, and clearing a field removes that tag. Nothing is shortened, stored or sent anywhere.
How to use it
- 1Enter the destination URL.
- 2Set the source, medium and campaign labels.
- 3Copy the generated URL into your campaign.
How it works
The browser URL and URLSearchParams APIs preserve existing query parameters and encode the campaign values. No shortener or external tracking service is called.
Example
Tag a product page with source=newsletter, medium=email and campaign=fall-launch; the new URL contains utm_source, utm_medium and utm_campaign.
Limitations & notes
- Use a complete http or https URL.
- Campaign naming conventions are up to your analytics setup.
Frequently asked questions
Which UTM parameters are required?
Google Analytics needs utm_source to attribute a visit, and in practice you should always set utm_source, utm_medium and utm_campaign together. Source names the sender (newsletter, linkedin), medium names the channel type (email, social, cpc), and campaign names the specific push (fall-launch). utm_term is mainly for paid search keywords, and utm_content distinguishes two links in the same message, such as header-button versus footer-link.
Are UTM values case-sensitive?
Yes. Analytics tools treat Email, email and EMAIL as three different mediums, which splits your reports. Pick a convention, usually all lowercase with hyphens instead of spaces, and keep a shared list of approved source and medium names. This builder trims leading and trailing spaces but keeps capitalization exactly as typed, and a space inside a value is encoded as a plus sign in the URL.
Which utm_medium values does GA4 recognize?
GA4 sorts traffic into default channel groups using the source and medium. For example, a medium of email, e-mail or e_mail lands in the Email channel, cpc or ppc with a search engine source becomes Paid Search, and social or social-network values map to Organic or Paid Social depending on the rules. A medium like newsletter-blast falls into Unassigned, so use standard medium names if you rely on the default reports.
Should I add UTM tags to links within my own website?
No. Tagging internal links, such as a homepage banner pointing to a product page, overwrites the visitor's original traffic source in analytics and can make a Google search or email visit look like it came from your own banner. Use UTMs only on links placed outside your site: emails, social posts, ads, partner sites, QR codes and printed material. Track internal clicks with events instead.
Will this tool break a URL that already has query parameters?
No. The builder parses the URL with the browser's URL API and adds the UTM keys to the existing query string, so https://example.com/shop?size=m#reviews becomes https://example.com/shop?size=m&utm_source=newsletter&utm_medium=email&utm_campaign=fall-launch#reviews. Existing UTM keys are replaced rather than duplicated. The URL must start with http:// or https://, otherwise the tool shows an error instead of a result.
No directly related discussion yet.
Start a focused thread and share the question this tool helped you explore.
Ask the community about UTM Campaign URL Builder