UTM builder (campaign URL generator)
A UTM link is your page's URL with utm_ parameters added so Google Analytics knows where a visit came from. Enter the URL, source, medium and campaign; the builder encodes the values, warns about mixed case and spaces, and gives you the finished link.
- Pass · Lowercase valuesall lowercase
- Pass · No spacesnone
- Pass · GA4 channelEmail
Campaign URL
https://www.example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=diwali_sale
- utm_source
- newsletter
- utm_medium
- utm_campaign
- diwali_sale
- GA4 default channel
- EmailFrom the medium: "newsletter" isn't one of the search, social, video or shopping sites this tool checks from Google's source list.
- Link length
- 95 characters
How does a UTM link work?
A UTM link is the page's URL with utm_ query parameters added. When a visit arrives on it, Google Analytics takes the visit's source, medium and campaign from those values; on a Google Ads link that is also auto-tagged, Google says the auto-tagged values are used for source and medium. Google's help also says missing UTM parameters show as (not set) in reports, and that the parameters are left out of the Page path + query string and Landing page + query string dimensions, so tagged links don't split your page reports.
This builder reads your URL with the browser's URL parser, keeps any existing parameters and #section, replaces utm_ values already in it, and adds yours before the #: RFC 3986 ends the query at the first #. Values are percent-encoded, so a space becomes %20 and & becomes %26. URLSearchParams would write a space as +, which form decoders turn back into a space but plain percent-decoding leaves as a plus sign; %20 means a space under both.
GA4's default channel group sorts each visit into a channel by rules on source, medium and campaign name. A medium of email lands in Email; a paid medium (one matching ^(.*cp.*|ppc|retargeting|paid.*)$) from a source on Google's social list lands in Paid Social; a medium with no rule, such as qr or newsletter, lands in Unassigned unless the source is on one of Google's lists. Channel rules ignore case, but reports list each spelling of a value separately.
page URL + ? + utm_source=… & utm_medium=… & utm_campaign=… + #fragment https://www.example.com/page?utm_source=newsletter&utm_medium=email&utm_campaign=diwali_sale#faq
Which utm_source and utm_medium should I use for each channel?
| Where the link goes | utm_source | utm_medium | GA4 default channel |
|---|---|---|---|
| Email newsletter | newsletter | ||
| Paid ad on Instagram | paid_social | Paid Social | |
| Organic post on LinkedIn | social | Organic Social | |
| WhatsApp broadcast | social | Organic Social | |
| Search ad on Bing, tagged by hand | bing | cpc | Paid Search |
| SMS campaign | sms | sms | SMS |
| Partner's website | partner_site | referral | Referral |
| Affiliate programme | affiliate_name | affiliate | Affiliates |
| QR code on a printed flyer | flyer | qr | Unassigned (no default rule; use a custom channel group) |
How to build a UTM campaign link
- 1Paste the page URLEnter the full address of the page the link should open, starting with https://. Existing parameters and a #section are kept.
- 2Fill in source, medium and campaignUse lowercase values, and pick a medium from the table so GA4 puts the visit in the right channel.
- 3Add the optional fieldsAdd a campaign ID, a paid keyword, or a content value to tell two links in the same campaign apart.
- 4Check the warnings and copy the linkFix any capitals, spaces or Unassigned channel the checks flag, then copy the campaign URL.
Frequently asked questions
Should I add UTM tags to links within my own site?
Which UTM parameters are required?
Are UTM parameters case-sensitive in GA4?
Why does my UTM traffic show as Unassigned in GA4?
What is the difference between utm_source and utm_medium?
Sources
- Google Analytics Help: URL builders, collect campaign data with custom URLs (checked 20 Oct 2026)
- Google Analytics Help: Default channel group (checked 20 Oct 2026)
- Google: GA4 source categories (list linked from the Default channel group page) (checked 20 Oct 2026)
- Google Analytics Help: Custom channel groups (checked 20 Oct 2026)
- Google Analytics Help: Campaigns and traffic sources (checked 20 Oct 2026)
- Google Analytics Help: Traffic-source dimensions, manual tagging, and auto-tagging (checked 20 Oct 2026)
- RFC 3986: URI generic syntax (query, fragment, percent-encoding) (checked 20 Oct 2026)
- WHATWG URL Standard (space as + in form encoding) (checked 20 Oct 2026)
Need a custom dev tool for your team?
We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.
Built by CountryDevs · No signup · No ads · We count visits, never what you enter