What are UTM parameters?
UTM parameters are tags you add to the end of a link so Google Analytics and other analytics tools know where a visitor came from. When someone clicks example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale, the visit is credited to your spring sale newsletter instead of showing up as direct traffic. UTM stands for Urchin Tracking Module, after the analytics company Google bought to create Google Analytics.
| Parameter | What it answers | Example | Shows in GA4 as |
|---|---|---|---|
| utm_source | Which site, app or list sent the visit | google, newsletter, facebook | Session source, Session manual source |
| utm_medium | What kind of channel it was | cpc, email, social, affiliate | Session medium, Session manual medium |
| utm_campaign | Which campaign or promotion | spring_sale | Session campaign, Session manual campaign name |
| utm_term | The paid keyword | running shoes | Session manual term |
| utm_content | Which ad, link or button, to tell versions apart | blue_banner | Session manual ad content |
| utm_id | A campaign ID, used to join imported cost data | abc.123 | Session manual campaign ID |
Google recommends always using utm_source, utm_medium and utm_campaign; any you leave out show as (not set). GA4 also accepts utm_source_platform, utm_creative_format and utm_marketing_tactic under GA4 extra parameters above, though Google says the last two are not currently shown in reports.
How to build a UTM link
- Paste the page address into Website URL. Existing query strings and #anchors are kept.
- Fill in source, medium and campaign. Pick a preset for Google Ads, Meta, LinkedIn, TikTok, email or organic social to fill them in.
- Check the GA4 channel. If it says Unassigned, change the medium to one GA4 recognizes.
- Copy the link and use it in your ad, email or post. Your last 10 links stay in Recent links on this device.
UTM examples
| Where the link goes | Source | Medium | GA4 channel |
|---|---|---|---|
| Newsletter link | newsletter | ||
https://example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale&utm_content=hero_button | |||
| Instagram bio link | social | Organic Social | |
https://example.com/?utm_source=instagram&utm_medium=social&utm_campaign=bio_link | |||
| Facebook ad | paid_social | Paid Social | |
https://example.com/shoes?utm_source=facebook&utm_medium=paid_social&utm_campaign=fall_shoes&utm_content=carousel_a | |||
| LinkedIn post | social | Organic Social | |
https://example.com/webinar?utm_source=linkedin&utm_medium=social&utm_campaign=webinar_oct | |||
| Partner site | partnerblog | affiliate | Affiliates |
https://example.com/?utm_source=partnerblog&utm_medium=affiliate&utm_campaign=q4_partners | |||
| QR code on a flyer | flyer | qr | Unassigned |
https://example.com/menu?utm_source=flyer&utm_medium=qr&utm_campaign=store_opening | |||
GA4 has no channel for print or QR codes, so a QR code tagged medium=qr lands in Unassigned. That is fine if you report on the source and campaign; to give it its own row in channel reports, create a custom channel group in GA4 with a rule for that medium.
How GA4 assigns a channel to your UTMs
GA4 sorts every session into a default channel group by checking the source, medium and campaign name against a fixed list of rules. The rules ignore upper and lower case. The ones that matter most for tagged links:
- Paid Search, Paid Social, Paid Video, Paid Shopping: the source is a known search, social, video or shopping site and the medium matches
^(.*cp.*|ppc|retargeting|paid.*)$, for example cpc, ppc or paid_social. - Display: medium is display, banner, expandable, interstitial or cpm.
- Paid Other: a paid medium with a source that is not a known site, such as source=partner and medium=cpc.
- Organic Social: a known social source, or medium social, social-network, social-media, sm, social network or social media.
- Email: source or medium is email, e-mail, e_mail or e mail.
- Referral: medium referral, app or link. Affiliates: medium affiliate. Audio: medium audio. SMS: source or medium sms. AI Assistant: medium ai-assistant.
- Unassigned: anything that matches no rule, such as medium=newsletter or medium=qr.
That is why utm_medium=email beats utm_medium=newsletter: the first lands in the Email channel, the second in Unassigned. Known sites come from Google's source category list, which has entries such as facebook, fb, ig, linkedin, tiktok, google, bing, youtube and amazon. Some popular names, including x and threads, are not on it yet, so a paid link with source=x counts as Paid Other.
UTM parameters for Google Ads, Meta, LinkedIn and TikTok
Ad platforms can fill in campaign and ad names for you with dynamic parameters, so one link template works for every ad. The presets above use these.
| Platform | Where to paste | Dynamic values |
|---|---|---|
| Google Ads | Final URL suffix (account, campaign or ad group) | {campaignid} {adgroupid} {keyword} {creative} {matchtype} {network} {device} |
| Meta Ads | Ad level, Tracking, URL parameters | {{campaign.name}} {{adset.name}} {{ad.name}} {{campaign.id}} {{adset.id}} {{ad.id}} {{site_source_name}} {{placement}} |
| LinkedIn Ads | Account or campaign URL parameters | {{CAMPAIGN_NAME}} {{AD_SET_NAME}} {{AD_NAME}} {{AD_ID}} (older accounts: {{CAMPAIGN_GROUP_NAME}} {{CREATIVE_ID}}) |
| TikTok Ads | Ad details, Build URL parameters | __CAMPAIGN_NAME__ __AID_NAME__ __CID_NAME__ __CAMPAIGN_ID__ __PLACEMENT__ |
Google Ads has no ValueTrack value for the campaign name, so the preset uses {campaignid}; for names, set a custom parameter such as {_campaign} on each campaign. Google Ads also tags every click automatically with gclid. When a click carries both, GA4 uses the auto-tagged values for source, medium and campaign and only takes utm_term and utm_content from your tags, and unlike the old Universal Analytics there is no setting to let manual tags win.
Meta fills in {{site_source_name}} with fb, ig, msg, an or th, and name parameters keep the name the ad had when it was first published. Meta and TikTok can also add their own source and medium automatically, so check the ad's tracking section before adding a second set. LinkedIn only accepts letters, numbers, _ + and - in fixed values.
UTM best practices
- Use lowercase. UTM values are case sensitive, so Facebook, facebook and FACEBOOK become three rows in your reports.
- Pick one separator. Use - or _ instead of spaces, and stick to it.
- Never tag internal links. A UTM on a banner or link between your own pages makes GA4 credit later key events to that link instead of the campaign that brought the visitor. Track internal promotions with promotion events instead.
- Keep personal data out. Do not put email addresses, names or phone numbers in UTM values; Google Analytics does not allow personally identifiable information.
- Write your naming rules down and keep every link you create in one sheet. The Bulk tab exports a CSV you can paste into Google Sheets or Excel.
Building UTM links in bulk
Switch to Bulk, paste one page per line and the sources you post to, one per line or separated by commas. Every page gets a link for every source with the same medium and campaign, up to 1,000 links. Copy them all at once or download a CSV with the original URL, each UTM value, the tagged URL and its GA4 channel.
Sources
- Google Analytics Help: Collect campaign data with custom URLs
- Google Analytics Help: [GA4] Default channel group
- Google Ads Help: Set up tracking with ValueTrack parameters
- Google Analytics Help: Manual and auto-tagging
- Meta Business Help: Dynamic URL parameters
- LinkedIn Help: Dynamic UTM parameters
- TikTok Ads Help: Track web events with UTM parameters