How to build a UTM link
- Paste the landing page. Use the exact page people should land on, not your home page by default. If the address already has a query string (
?size=10) or an anchor (#pricing), leave them in: the builder adds the tags in the right place. - Pick a preset or fill in the source and medium. The presets fill values that Google Analytics 4 sorts into the channel you expect, such as
facebookandpaid_socialfor Meta ads. Change the source to match the real site or list. - Name the campaign. One name per promotion, used on every link of that promotion, in every channel. Add a term or content value when you need to compare keywords, ads or buttons inside the same campaign.
- Check the channel and copy. The result shows the GA4 channel the link will land in and anything that would split or lose data. Copy the full link for a post, an email or a QR code, or only the parameters for an ad platform's tracking field.
A UTM builder is also called a campaign URL builder or a UTM generator: they all do the same job, which is adding a few labelled values to the end of a link so your analytics can tell which campaign brought each visit. Google's own builder sits on its developer tools site; this one adds the GA4 channel check, the presets and the clean-up rules.
The UTM parameters, one by one
There are five classic parameters, plus utm_id, which GA4 also reads. Only the first three are needed on every link, and they work best together.
| Parameter | Answers | Example | Needed |
|---|---|---|---|
utm_source | Who sent the visit | google, facebook, newsletter | Always |
utm_medium | What kind of traffic it is | cpc, paid_social, email | Always |
utm_campaign | Which promotion it belongs to | spring_sale_2026 | Always |
utm_term | Which keyword or audience | running_shoes | For paid search and audience tests |
utm_content | Which ad, image or link | video_a, footer_link | When one campaign has several ads or links |
utm_id | Which campaign, by ID | spring26 | When you import cost data into GA4 |
In GA4 the values appear as session source, session medium and session campaign in the Traffic acquisition report, and as manual term and manual ad content in explorations. A link with a source but no medium, or no campaign name, still counts, but leaves gaps that show up as (not set) in the reports.
How GA4 sorts tagged links into channels
GA4 groups every visit into a default channel, such as Paid Social, Email or Organic Search, by reading the source and medium against a fixed set of rules published by Google. The rules run in order and the first one that matches wins. You cannot edit the default rules, so the only way to land in the right channel is to tag the link the way the rules expect. The common cases:
| Source | Medium | GA4 default channel |
|---|---|---|
facebook, instagram, linkedin | paid_social or cpc | Paid Social |
facebook, instagram, linkedin | social | Organic Social |
google, bing | cpc | Paid Search |
youtube | cpc or paid_video | Paid Video |
| An ad network or a publisher | display or banner | Display |
newsletter | email | |
| A partner's name | affiliate | Affiliates |
sms | sms | SMS |
| An unknown site | cpc or anything starting with paid | Paid Other |
qr_code | print | Unassigned |
Two details catch people out. First, the paid channels need both halves: a paid medium (one that contains cp, equals ppc or retargeting, or starts with paid) and a source that Google's own list knows as a search, social, video or shopping site. A paid medium with a source GA4 does not recognize lands in Paid Other. Second, there is no channel for print or offline traffic. Visits from a QR code on a flyer show up as Unassigned in the default channel report, which is expected: find them by session source, or create a custom channel group for offline campaigns.
The check in the builder follows Google's published rules and matches the source against a short list of the most common sites. Google's full list has hundreds of entries, so a niche site may be recognized by GA4 even when the builder says Paid Other.
Naming rules that keep reports clean
- Lowercase everything. GA4 keeps values exactly as written, so
Facebook,facebookandFBbecome three rows of the same traffic. The builder lowercases values for you unless you switch it off. - Underscores, not spaces. A space becomes
%20in the link, which is valid but hard to read and easy to retype wrong. Pick underscores or hyphens and stick with one. - Write the list down. Agree on the allowed sources and mediums once, in a shared sheet, and use them every time. Most broken reports come from three people tagging the same channel three ways.
- Never tag internal links. A UTM link from your own menu or blog to another of your pages starts a new session with that campaign, and the visit loses its real source. Tags are for links that live outside your site.
- Do not tag Google Ads when auto-tagging is on. Auto-tagging adds a
gclidto every ad click, and a linked GA4 property reads the campaign, ad group and keyword from it. Manual tags are for every other platform, or for accounts that turn auto-tagging off.
Where to paste the link
| Platform | What to paste | Preset |
|---|---|---|
| Meta Ads Manager (Facebook and Instagram ads) | The parameters only, in the URL parameters field of the ad, so the website URL stays clean | Meta ads |
| LinkedIn Campaign Manager | The full tagged link as the destination URL of the ad | LinkedIn ads |
| Google Ads | Usually nothing, auto-tagging covers it. If it is off, the parameters in the final URL suffix | Google Ads |
| Email platforms | The full link on each button and link. Check first whether the platform already adds its own tags, to avoid two sets | Newsletter |
| Organic posts and bios | The full link, or a short link that redirects to it | Organic social |
| Print, packaging, signs | A QR code generated from the full tagged link | QR code |
Ad platforms can fill values in for you. Placeholders in curly braces, such as {{campaign.name}} in Meta Ads Manager or {keyword} in Google Ads, are left exactly as you type them, without lowercasing or encoding, so the platform can replace them when the ad runs. The GA4 channel check then depends on the value the platform fills in, and the builder says so.
Query strings, anchors and special characters
A link has a fixed order: the address, then the query string after ?, then the anchor after #. UTM tags belong in the query string. If your page already has one, the tags are added after it with &, and the existing values are kept as they are. If it has an anchor, the anchor stays at the very end, where the browser expects it; a tag placed after the # never reaches your analytics. If the address already carries UTM tags, the builder replaces them with the new values and tells you, so the link never has two sources.
Characters with a meaning in a URL, such as &, ?, #, = and accented letters, are percent-encoded inside each value, so a campaign called Q&A night cannot break the link. The builder also warns about click IDs (gclid, fbclid) copied by accident from a visited page, and about values that look like a full web address where a short name belongs.
Methodology and limits
- Building the link
- The URL is split into address, query string and anchor. An address without
http://orhttps://getshttps://, and an address with no path gets a/. Spaces in the address are encoded as%20. The existing query string is kept byte for byte, except anyutm_source,utm_medium,utm_campaign,utm_term,utm_contentorutm_idalready in it, which are replaced. The new tags follow in the order source, medium, campaign, ID, term, content, then the anchor. - Values
- With the clean-up option on, each value is trimmed, lowercased and its runs of spaces become one underscore. Each value is then encoded with the standard JavaScript
encodeURIComponentrules from RFC 3986. Text in curly braces ({{...}}or{word}) is copied as written for ad platform placeholders. - GA4 channel
- The source, medium and campaign name are checked, ignoring case, against the default channel group rules in Google's Analytics Help, in Google's order: Cross-network, Paid Shopping, Paid Search, Paid Social, Paid Video, Display, Paid Other, Organic Shopping, Organic Social, Organic Video, Organic Search, Referral, Email, Affiliates, Audio, SMS, Mobile Push Notifications, then Unassigned. Google matches sources against its own lists of search, social, video and shopping sites; the builder uses a short list of common names from each, so it can say Paid Other or Unassigned for a site GA4 knows.
- Privacy
- Links are built in your browser and nothing is stored. The page counts anonymous events (a link built, copied or tested) without cookies and without the link or its values. Only if you choose to include your result in the quote form and submit it do we receive a one-line summary of the link you built, so we know what you were working on.
- Limits
- One link at a time. No link shortening and no QR code here. The channel check covers the default channel group only; custom channel groups in your property can file the same link elsewhere.
Sources
- [GA4] Default channel group, Google Analytics Help, for the channel rules and their order
- [GA4] URL builders: Collect campaign data with custom URLs, Google Analytics Help, for the parameters GA4 reads
- Campaign URL Builder, Google Analytics Developer Tools
- About auto-tagging, Google Ads Help, for the gclid parameter
- RFC 3986: Uniform Resource Identifier (URI): Generic Syntax, IETF, for the order of query and fragment and for percent-encoding


