Sub topic 2
Tagging campaign links with UTM parameters
This chapter assumes you know the GA4 interface, understand sessions, and can recognize search, email and social traffic. You should also know that a URL can carry query parameters, the text after the ?.
GA4 sorts each session into a channel group using its source, medium and campaign values. You control two of these values by tagging your links. Untagged links leave GA4 to guess, and guesses often land in Direct, Referral or Unassigned.
Tagging links with UTM parameters
UTM parameters are query parameters that describe where a link is used. The three main ones are:
utm_source: the site or sender, such asnewsletterorgoogle.utm_medium: the channel type, such asemail,cpcorsocial.utm_campaign: the campaign name, such asspring_sale_2026.
Build tagged URLs with a script so the spelling stays consistent:
from urllib.parse import urlencode
params = {
"utm_source": "newsletter",
"utm_medium": "email",
"utm_campaign": "spring_sale_2026",
}
print("https://www.example.com/spring-sale?" + urlencode(params))The output is https://www.example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026. Because the medium is email, GA4 classifies sessions from this link as Email.
Google Ads auto-tagging and account linking
Auto-tagging adds a gclid parameter to Google Ads links automatically. Linking your Google Ads account to the GA4 property lets GA4 import the campaign data. Auto-tagging is on by default when you link, so you usually do not need to add UTM parameters to Google Ads links. Do not add UTM parameters to those links anyway, because a manual value can override the auto-tagged campaign data.
Source categories
GA4 recognizes known search engines, social networks, shopping sites and video sites by their source domain. A source such as google with a search-style medium falls under search. An unknown domain does not get a category, so tag it yourself.
Paid versus organic
A channel counts as paid when the medium signals paid placement, such as cpc, ppc or paid_social. The same source with a medium of organic counts as organic search. Medium is the field that separates paid from free traffic, so an error in medium changes the channel.
Direct and Referral
Direct traffic has no referrer and no campaign tags. It usually comes from typed URLs, bookmarks or links in apps that strip tracking data. Referral traffic comes from another website's link that carries no UTM parameters. Treat both as descriptions of missing tags, not as proof of a specific source.
Session arrives
-> medium is email? -> Email
-> medium is cpc or ppc? -> Paid Search or Paid Social
-> source is a known search? -> Organic Search
-> no referrer, no tags? -> Direct
-> other site link? -> Referral
-> nothing else matches? -> UnassignedExercise
A partner site links to your page with the URL https://www.example.com/offer. Which channel does GA4 most likely assign, and how would you change the link so the traffic lands in the channel you intend?
Show answer
GA4 most likely assigns Referral, because the link comes from another site without UTM tags. To control the channel, add UTM parameters such as utmsource=partner-name, utmmedium=referral, and a utm_campaign value to the link.