Skip to content

UTM Link Builder

Add utm_source, utm_medium, utm_campaign and other UTM parameters to a URL. The tool keeps existing parameters and #fragments and encodes values.

Mode

Existing parameters and any #fragment are kept.

91 characters · 3 UTM parameters

https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale

The referrer: who sends the traffic.

The marketing medium. In Google Analytics 4 "email" maps to Email.

Product, slogan or promo code.

Paid keyword.

Tells creatives or links apart, such as two links in one email.

Identifies a specific campaign or promotion.

Letter case
Spaces in values

Links from this session (0)

A link is added when you copy it. The list is kept in this page’s memory only: it is not saved or sent anywhere, and reloading clears it.

The link is built in your browser. The URL and values are not sent to our server.

01 · Definition

What is a UTM builder?

A UTM builder adds campaign parameters such as utm_source, utm_medium and utm_campaign to a link, so that analytics tools can report which email, ad or post a visit came from. The parameters are ordinary query-string values: they do not change the page that opens, only how the visit is labelled in reports.

02 · Overview

How the UTM Link Builder works

The tool builds a campaign URL from a page address and up to six UTM parameters: utm_source, utm_medium, utm_campaign, utm_term, utm_content and utm_id. The address is parsed with the browser's URL API, so parameters that are already there are kept, a UTM parameter that is already there is replaced rather than duplicated, and everything goes before the #fragment. Values are percent-encoded, lower-cased by default, and spaces become underscores, hyphens or %20. Medium presets fill in common values, bulk mode tags up to 200 URLs at once, and links you copy are listed for the rest of the session. The link is built in your browser and is not sent to our server.

03 · Guide

UTM parameters explained

The descriptions are Google's, from the Analytics help page on URL builders, as are the examples where Google gives one. Google says to always use utm_source, utm_medium and utm_campaign when you add parameters. None is technically required, and they can be in any order.

Google lists three more parameters that this tool has no fields for: utm_source_platform, utm_creative_format and utm_marketing_tactic. Google notes that the last two are not currently reported in Analytics. If you type them into the page URL, they are kept.

ParameterGoogle's descriptionExample
utm_sourceReferrergoogle, newsletter4, billboard
utm_mediumMarketing mediumcpc, banner, email
utm_campaignProduct, slogan, promo codespring_sale
utm_termPaid keywordNone given
utm_contentUse to differentiate creativestoplink
utm_idCampaign ID, to identify a specific campaign or promotionNone given
The six UTM parameters this tool sets

04 · Guide

utm_medium values and Google Analytics 4 channels

Google Analytics 4 sorts traffic into default channel groups with fixed rules, and most of those rules read utm_medium. A value the rules do not know is reported as Unassigned. The presets in this tool use values the rules recognise, except qr, which has no rule: it is a common convention for printed codes and needs a custom channel group to show up as its own channel.

utm_mediumDefault channelRule
emailEmailMedium is email, e-mail, e_mail or e mail
cpcPaid Search, Paid Social or Paid OtherMedium contains cp, is ppc or retargeting, or starts with paid; the source decides which
socialOrganic SocialMedium is social, social-network, social-media, sm, or the source is a known social site
referralReferralMedium is referral, app or link
displayDisplayMedium is display, banner, expandable, interstitial or cpm
affiliateAffiliatesMedium is affiliate
smsSMSMedium or source is sms
qrUnassignedNo default rule
How GA4's default channel group reads the medium presets

05 · Use cases

When to use the UTM Link Builder

  1. 01

    Tag the links in a newsletter so its visits show up under Email

  2. 02

    Give each ad or social post its own utm_content to compare them

  3. 03

    Tag a URL before turning it into a QR code for print

  4. 04

    Tag a list of landing pages for one campaign in bulk

06 · Examples

UTM Link Builder examples

https://example.com/pricing + source newsletter, medium email, campaign spring_sale

ex 01

https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale

The three parameters Google says to always use.

https://example.com/pricing?plan=pro#faq with the same values

ex 02

https://example.com/pricing?plan=pro&utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale#faq

plan=pro is kept, and the UTM parameters go before #faq so the page still scrolls to that section.

Campaign “50% off + more”, spaces as underscores

ex 03

utm_campaign=50%25_off_%2B_more

Characters with a meaning in URLs are percent-encoded, so the value reads back exactly as typed.

https://example.com/?utm_source=old&x=1 + source new

ex 04

https://example.com/?x=1&utm_source=new

A UTM parameter that was already in the URL is replaced, not added a second time. The tool says which one it replaced.

07 · FAQ

UTM Builder: frequently asked questions

Which UTM parameters are required?

None is enforced, but Google's guidance is that "you should always use utm_source, utm_medium, and utm_campaign". The tool builds a link with whatever you fill in and shows a warning while any of those three is empty. utm_term, utm_content and utm_id are optional.

Are UTM values case-sensitive?

Yes. Google's help page says parameter values are case sensitive, so utm_source=google and utm_source=Google are reported as two sources. That is why this tool lower-cases values by default. Turn the option off to keep capitals; the tool then warns about any value that has them.

What happens to parameters and fragments already in my URL?

They are kept. Existing query parameters stay first, exactly as written, and the UTM parameters are appended after them with &. A #fragment stays at the very end, because a URL's query string ends at the #. If the URL already has a UTM parameter that you are setting, the old value is replaced.

How are spaces and special characters handled?

Spaces become underscores by default; you can choose hyphens or keep them, in which case they are written as %20. Everything else goes through encodeURIComponent, which leaves letters, digits and - _ . ! ~ * ' ( ) as they are and percent-encodes the rest, so & becomes %26 and + becomes %2B.

Does the order of UTM parameters matter?

No. Google says parameters can be added to a URL in any order. This tool writes them as source, medium, campaign, term, content, id.

Which utm_medium should I use?

Use one that your analytics tool recognises. In Google Analytics 4's default channel group, email maps to Email, cpc to Paid Search, Paid Social or Paid Other depending on the source, social to Organic Social, referral to Referral, display to Display, affiliate to Affiliates and sms to SMS. A medium with no rule, such as qr, is reported as Unassigned.

Is my link history saved?

No. The list of links from this session is held in the page's memory only. It is not written to storage or sent anywhere, and it is gone when you reload or close the page. Copy what you need before leaving.

Are my URLs sent to your server?

No. Links are built in the page. The page loads standard page analytics, which record the visit and that Copy or Download was used, not the URL or the values.

08 · Reference

Specs and further reading

These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.

09 · More

Tools that pair with UTM Builder

Last updated .