UTM Builder
Add utm_source, utm_medium, utm_campaign, and optional term/content parameters to a URL for campaign tracking.
Generated URL
How it works
The base URL is parsed with the browser's own URL API, which is why you get an
error until you include https://: the parser needs a scheme, and it's the same
parser your browser uses for real navigation, so if it accepts the URL here, the URL works.
Each of the five utm_ values is then applied through
searchParams.set(), which percent-encodes special characters automatically
(a campaign named spring sale becomes spring+sale in the query
string, an ampersand becomes %26 instead of splitting your parameter in two).
Using set() rather than string concatenation also means query parameters
already on the URL are preserved, clearing a field removes its parameter instead of leaving
an empty utm_term= behind, and a #fragment stays where it belongs,
after the query string.
The mistake that quietly ruins campaign reports: UTM values are case-sensitive in
analytics. GA4 will happily show email, Email, and
EMAIL as three separate sources, splitting one campaign's numbers three ways.
Pick all-lowercase and never deviate. It also pays to keep utm_medium inside
the vocabulary GA4's default channel grouping recognizes, like email,
cpc, social, or referral; invent something creative
and your traffic lands in the Unassigned bucket where nobody looks.
The URL is assembled locally on every keystroke and is never requested, pinged, or logged by this page. Open the DevTools Network tab and type away: nothing fires. The finished link only travels anywhere when you paste it into your campaign.
Common questions
What's the difference between source and medium?
Source is where the traffic comes from (google, newsletter, twitter). Medium is the type of channel (cpc, email, social, organic). Together they answer "where did this visit come from and how."
Do I need term and content?
Only for more granular tracking. Term is typically used for paid search keywords, content for distinguishing between two links pointing to the same place (like two buttons in the same email).
Will this work with any analytics tool?
Yes, utm_source/medium/campaign/term/content are a de facto standard read by Google Analytics and most other analytics platforms, not a Google-specific format.