A UTM code is a destination URL plus one or more utm_ query parameters that identify a specific campaign in your analytics reports. The traditional set contains exactly five keys — utm_source, utm_medium, utm_campaign, utm_term, and utm_content — of which three are required (source, medium, campaign) and two are optional (term and content). Used by Google Analytics and most other analytics platforms, these tags attribute visits to a campaign, a channel, and a placement so they appear as distinct rows in your traffic-source reporting. Building one correctly means combining the final destination URL, such as https://example.com/pricing, with values that your reporting team will recognize, then encoding the result so the link remains valid. Hand-edited UTM codes are easy to break with stray characters, mixed casing, or duplicate keys, which is why a UTM Link Builder is a safer choice. The local builder accepts a full http or https URL, asks only for the values you decide to set, trims outer spaces from what you typed, normalizes URL encoding, and returns a campaign link that keeps your path, unrelated query parameters, and any #fragment intact — all without sending the URL or your labels to a server.

Anatomy of a UTM code
A UTM code is not a separate thing from your landing page. It is the same destination URL, with extra context attached through the query string. When a visitor clicks the link, the analytics snippet on the page reads those parameters and groups the session under the campaign you described. The general structure of a UTM code is:
<scheme>://<host><path>?<key>=<value>&<key>=<value>#<fragment>
Only the keys that begin with the utm_ prefix carry campaign meaning, and only the five traditional keys are recognised by Google's manual tagging guidance. Anything else that already lives in the query string — for example ref=homepage, gclid=abc123, or language=en — is preserved alongside the new utm_ keys unless it is itself one of the five managed UTM keys, which the builder replaces. This is what makes a UTM code different from a server-side redirect, a meta refresh, or a JavaScript-based tracker: the campaign information travels inside the URL itself, so the destination, the analytics provider, and the link publisher all read the same tags.
The five traditional UTM parameters
| Parameter | Required? | Purpose |
|---|---|---|
| utm_source | Required | Identifies where the traffic came from (e.g., google, newsletter, partner). |
| utm_medium | Required | Names the marketing channel (e.g., cpc, email, social, qr). |
| utm_campaign | Required | Names the specific promotion (e.g., spring-launch, black-friday). |
| utm_term | Optional | Legacy paid keyword or phrase; useful when a destination depends on it. |
| utm_content | Optional | Differentiates ads or links that share source, medium, and campaign. |
The source/medium/campaign triplet is what populates your traffic-source dimensions in Google Analytics reporting. utm_term and utm_content remain inside the builder for convenience but are not required for a link to be a valid UTM code. If you leave the optional fields blank, the builder drops those parameters entirely instead of writing empty key=value pairs, which makes the link easier to read and reduces accidental variation in your reports.
How to create a UTM code with the UTM Link Builder
The UTM Link Builder runs entirely in your browser, so the URL and the labels stay on your device. Follow these steps to produce a clean UTM code:
- Open the UTM Link Builder in your browser.
- Paste the complete http or https destination URL — for example https://example.com/pricing — including any existing query parameters you want to keep.
- Type a utm_source that identifies where the traffic will come from, such as google or newsletter.
- Type a utm_medium that names the channel, such as cpc, email, or qr.
- Type a utm_campaign using a name your reporting team will recognize, such as spring-launch.
- Add utm_term and utm_content only if your reporting convention calls for them; otherwise leave them blank.
- Generate the URL and inspect the result. The original path, the unrelated query parameters, and any #fragment should all still be present.
- Copy the finished UTM code and paste it into your ad creative, newsletter template, social post, partner placement, or QR code generator.
Behind the scenes, the builder parses the destination with the browser URL API, removes only the five managed UTM keys, trims outer whitespace from the values you entered, encodes the rest with ordinary URL query encoding, and writes the link back. Nothing leaves the page, so your campaign labels never reach a server.
What stays in the link when you build a UTM code
Most landing pages already carry query parameters that the destination depends on. A pricing page may use ?ref=homepage to highlight a hero variant; an ad-driven visit often arrives with gclid; a multilingual site may set language=en. When you create a UTM code against such a URL, you want the campaign tags added without erasing the existing context.
The UTM Link Builder is explicit about this contract: it deletes only the five utm_ keys and keeps every other query parameter, the path, and any #fragment. That means you can refresh a live campaign link by pasting it, replacing the campaign labels, and reusing the same destination configuration. It also means a #section anchor or a ?ref marker is preserved without you having to merge strings by hand. The only change inside the query string is the five managed UTM keys, which is exactly what your reporting needs and no more.
Inputs the builder does not accept
A UTM code only makes sense for web destinations, so the tool rejects anything outside that scope. Use a full http or https URL such as https://example.com/pricing. Relative paths, mailto: links, tel: links, file:// addresses, and other non-web schemes are not accepted because the result would not be a usable campaign link. Signed or pre-signed URLs — common in cloud storage and some authentication flows — should not be passed through the builder either: the browser URL API may reorder or normalize encoding, which would invalidate the signature. Start from an ordinary destination URL, generate the UTM code, and only then add a signing step downstream if your flow requires it.
Where UTM codes usually break
Inconsistent labels. google vs. Google vs. google_ads split what is conceptually one source into multiple rows in a report. The builder trims outer spaces but preserves the casing and punctuation you type, so pick a documented convention and apply it the same way each time.
Personal information in values. Query parameters show up in browser history, server logs, referrer reports, and analytics dashboards. Use a placement label such as team-newsletter, not a recipient's name, email address, phone number, or account number.
Mixing manual tags with auto-tagging. Google Ads auto-tagging appends a gclid parameter; manual UTM parameters still carry campaign meaning, but the two compete for attribution in some setups. Decide deliberately rather than stacking them blindly, and confirm your reporting view shows the campaign you expect.
Skipping the final test. The builder constructs a URL — it does not check whether your analytics property is receiving hits, whether a server-side redirect strips parameters, or whether consent gating changes attribution. Paste the finished UTM code into your own browser, fire it once, and confirm the source/medium/campaign triplet appears in your reporting view before you spend money on it.
Verifying a UTM code before publishing
Three quick checks catch most issues before a campaign goes live:
- Open the UTM code in a private browser window. The destination page should load without redirects stripping the parameters you want to keep.
- Inspect the URL bar. You should see utm_source=, utm_medium=, and utm_campaign= with the values you typed, plus any unrelated parameters and the #fragment you meant to retain.
- Open the analytics real-time or traffic-source view and load the link once. A short time later, the session should appear under the campaign you named.
If the session does not appear, the cause is usually outside the URL — a missing analytics snippet, a redirect that drops query parameters, or a consent banner blocking the request. The tool cannot diagnose those, which is why it does not claim to validate analytics for you. It returns a constructed URL and leaves the tracking test to your own setup.