How the UTM link builder works
UTM parameters — short for Urchin Tracking Module — are tags you attach to the end of a link so analytics tools can tell exactly where a visitor came from. Each tag is a key/value pair in the URL's query string, for example utm_source=newsletter. When someone clicks a tagged link, Google Analytics reads these values and credits the visit to the right campaign, channel and content.
This builder takes your base URL and appends the parameters you fill in, joining them with ? for the first tag and & for the rest. If your link already has a query string, the tags are added with & so nothing is overwritten, and any #fragment is detached, kept aside, and re-appended after the parameters. Every value is passed through encodeURIComponent, so spaces, ampersands and other reserved characters are safely percent-encoded.
https://example.com/sale with source spring news, medium email and campaign launch&promo becomes https://example.com/sale?utm_source=spring%20news&utm_medium=email&utm_campaign=launch%26promo — the space and ampersand inside the values are encoded so they are not mistaken for URL structure.The 5 UTM parameters
| Parameter | Required | What it records |
|---|---|---|
utm_source | Yes | Where the traffic comes from — the specific site or platform, e.g. google, newsletter. |
utm_medium | Yes | The type of channel, e.g. cpc, email, social. |
utm_campaign | Yes | The campaign name or promotion, e.g. spring_sale. |
utm_term | Optional | The paid-search keyword tied to the click, e.g. running+shoes. |
utm_content | Optional | Distinguishes similar links or ad creatives, e.g. logolink vs textlink. |
Reference note: parameter values are encoded with the browser's built-in encodeURIComponent, which follows the UTF-8 percent-encoding rules of the URL standard. UTM values are case-sensitive in Google Analytics, so keep your naming consistent.
Frequently asked questions
- What is a UTM parameter?
- A UTM parameter is a small tag added to the end of a URL as a query-string value, such as utm_source=newsletter. Analytics tools like Google Analytics read these tags to attribute a visit to a specific campaign, channel or piece of content, so you can see which marketing efforts drive traffic.
- What are the 5 UTM tags?
- The five UTM parameters are utm_source, utm_medium, utm_campaign, utm_term and utm_content. Source, medium and campaign are typically required for meaningful reporting, while term and content are optional, used for paid-search keywords and to distinguish similar links.
- What is utm_source vs utm_medium?
- utm_source names where the traffic comes from — the specific site or platform, e.g. google or newsletter. utm_medium describes the type of channel, such as cpc, email or social. Source answers which property sent the visitor; medium answers what kind of channel it was.
- Do UTM tags affect SEO?
- UTM tags do not directly help or hurt rankings; they are analytics query parameters, not ranking signals. But avoid adding them to internal links and canonical URLs, since duplicate tagged versions of a page can waste crawl budget if search engines index them separately.
- Are UTM values case-sensitive?
- Yes. Google Analytics treats UTM values as case-sensitive, so Email, email and EMAIL become three separate values. Pick a convention — lowercase is common — and apply it consistently across every campaign URL you build.
- Is my data sent anywhere?
- No. The UTM builder assembles your URL entirely in your browser using built-in JavaScript. Nothing you type into the base URL or parameter fields is uploaded to a server or stored anywhere — it is local only.