GA4 Link Tracking Setup Guide
Check, find and fix your UTM traffic in Google Analytics 4
GA4 Link Tracking Setup Guide
by TrimLink - Check, find and fix your UTM traffic in Google Analytics 4
You tag a link with UTM parameters, shorten it and share it. This guide covers the GA4 side: checking that the visit arrives, finding the campaign in reports, building a campaign report with key events, and fixing traffic that lands as (not set) or direct.
Check that the GA4 tag works
Before you share a link, open it yourself in a private window and watch the visit arrive in the Realtime report and in DebugView.
Realtime report
- 1.Open a private or incognito window. The Realtime report shows first-user dimensions, so arriving as a new visitor makes your test tags appear as the first user source.
- 2.Open your short link in that window and let the destination page finish loading.
- 3.In GA4, go to Reports > Realtime.
- 4.Find the card for active users by first user source, medium, source platform or campaign, and look for your utm_source and utm_campaign values.
DebugView
- 1.Open tagassistant.google.com and connect it to the full tagged destination URL, not the short link. Tag Assistant adds a debug parameter to the URL it opens, and a TrimLink short link does not pass its own query string on.
- 2.In GA4, go to Admin > Data display > DebugView.
- 3.If more than one device is in debug mode, pick yours from the Debug device menu at the top left.
- 4.In the seconds stream, click the page_view event and check that page_location contains your utm_ parameters.
Nothing in either view? Check that the GA4 tag is on the destination page itself. A link to a page without your tag never shows up in GA4.
Find where UTM data shows up
Traffic acquisition shows which campaign started each session. User acquisition shows which campaign first brought each new user.
| Report | Where | Scope | Dimensions to pick |
|---|---|---|---|
| Traffic acquisition | Reports > Acquisition > Traffic acquisition | Session | Session primary channel group, Session source / medium, Session campaign |
| User acquisition | Reports > Acquisition > User acquisition | First user | First user primary channel group, First user source, First user campaign |
- Use the dimension drop-down in the table to switch between the channel group, Session source / medium and Session campaign.
- Click + next to the drop-down to add a second dimension, for example Session manual ad content to split one campaign by utm_content.
Session scope
What brought this visit?
Every new session gets the source, medium and campaign of the link that started it. A returning user who opens your newsletter link today counts under the newsletter, even if they first found you on Google.
First-user scope
What brought this person the first time?
The value is set on the first visit and stays with the user. The same returning user stays under Google in User acquisition, however many newsletters they open later.
Match each UTM parameter to its GA4 dimension
Each UTM parameter fills a session-scoped dimension, such as Session manual ad content for utm_content. Use these names when you pick dimensions in a report or exploration.
| Parameter | Session-scoped dimension | First-user dimension | Example value |
|---|---|---|---|
| utm_source | Session source, Session manual source | First user source | newsletter |
| utm_medium | Session medium, Session manual medium | First user medium | |
| utm_campaign | Session campaign, Session manual campaign name | First user campaign | black_friday_2026 |
| utm_content | Session manual ad content | First user manual ad content | header_button |
| utm_term | Session manual term | First user manual term | running_shoes |
- Session source, Session medium and Session campaign also hold traffic GA4 sorts without tags, such as google / organic. The "manual" dimensions are filled from your utm_ tags.
- Always set utm_source, utm_medium and utm_campaign. Google notes that a missing parameter shows up as (not set).
- GA4 leaves UTM parameters out of Page path + query string and Landing page + query string. The full URL, tags included, is in Page location.
Build a campaign report with key events
Mark the actions that matter as key events, then build a free-form exploration that shows sessions and key events by campaign and source / medium.
First, go to Admin > Data display > Events and click the star next to each event that counts as a result, such as sign_up, generate_lead or purchase. GA4 now calls these key events; they used to be called conversions. Marking an event changes reports from that moment on, not past data.
Free-form exploration
- 1.Click Explore on the left, then pick Free form.
- 2.In the Variables column, click + next to Dimensions. Select Session campaign, Session source / medium and Session manual ad content, then click Import.
- 3.Click + next to Metrics. Select Sessions, Engaged sessions, Key events and Session key event rate, then click Import.
- 4.Drag Session campaign into Rows, with Session source / medium under it. Drag the four metrics into Values.
- 5.To look at one campaign, drag Session campaign into Filters and match it to the campaign name, for example black_friday_2026.
- 6.Give the exploration a clear name, such as Campaigns by key events, so you can find it again under Explore.
Add a custom channel group for your own mediums
If mediums like qr or newsletter land in Unassigned, create a custom channel group with rules for them, or switch to mediums the default rules already know.
| utm_medium | utm_source | Default channel | Why |
|---|---|---|---|
| newsletter | The medium is email | ||
| newsletter | mailchimp | Unassigned | Neither value is email, e-mail, e_mail or e mail |
| social | Organic Social | social is on the social medium list | |
| cpc | Paid Social | A social source with a paid medium | |
| referral | partner_site | Referral | The medium is referral, app or link |
| qr | poster | Unassigned | No default rule uses qr |
| flyer | Unassigned | No default rule uses print |
- 1.Go to Admin > Data display > Channel groups. You need the Editor role or higher.
- 2.Click Create new channel group. GA4 starts you with a copy of the default group.
- 3.Name the group, click Add new channel and call it QR and print. Click Add condition group and set Medium matches regex ^(qr|print)$.
- 4.Click Reorder, drag the new channel near the top and click Apply. GA4 puts traffic in the first channel whose rules it matches.
- 5.Click Save group. Custom groups also apply to past data, and you can use yours as a dimension in reports and explorations.
- 6.To make it the default in reports, set it as the primary channel group. That change only applies from then on.
A standard GA4 property can have two custom channel groups besides the default one. Channel rules ignore case, so Email and email land in the same channel.
Fix UTM traffic that shows as (not set), direct or the wrong campaign
GA4 reads campaign values from the URL of the page where its tag runs. Redirects, scripts, mixed capitalisation and tags on your own links all change what it records.
A redirect drops the query string
A redirect between the click and the page with your tag sends the visitor to a URL without the ?utm_ part. GA4 sees no campaign and falls back to the referrer, or to direct.
Fix: Open the tagged link and look at the address bar once the page loads. If the utm_ part is gone, make that redirect keep the query string.
A JavaScript redirect
A page that loads and then sends the visitor on with a script loses the tags when the script builds the next URL without the query string. The redirect page can also become the referrer.
Fix: Use a server-side redirect, or have the script copy window.location.search onto the next URL. Test again in a private window.
Mixed capitalisation
UTM values are case sensitive, so Facebook, facebook and FACEBOOK are three rows in Session source. Channel rules ignore case, so the split hides until you open source / medium.
Fix: Write every value in lowercase and build links from a saved template so everyone types the same values.
UTMs on your own internal links
GA4 does not start a new session when it sees a new campaign mid-visit. The session keeps its source, but later events carry your internal tag, so a key event can be credited to your own banner.
Fix: Keep UTMs for links on other sites, in emails, ads and print. Track clicks on your own banners and menus with a GA4 event.
Missing parameters
A link with utm_source and utm_medium but no utm_campaign shows (not set) under Session campaign.
Fix: Set source, medium and campaign on every link. Use one template per channel so none get skipped.
What TrimLink does with your UTMs
A TrimLink short link sends visitors to the destination URL saved on the link, query string included, with a server-side redirect: 307 for short links, 302 for QR code scans. Your utm_ tags reach the page as you wrote them.
TrimLink does not copy a query string added to the short link itself onto the destination. Tags added after the short code never reach GA4, so put the UTMs on the destination URL when you create the link.
Compare GA4 sessions with TrimLink clicks
Expect fewer GA4 sessions than link clicks. Use clicks to see how often a link was opened, and GA4 to see what visitors did on your site.
A TrimLink click is counted when someone opens the short link. A GA4 session is counted only when the GA4 tag loads on the destination page and is allowed to send data. The two numbers will never match exactly.
Why the numbers differ
Bots
GA4 removes known bots and spiders automatically and does not show how many it removed. Link counters use their own filters, so bot traffic never lines up.
Ad blockers
Extensions and browser settings that block analytics scripts stop the GA4 tag. The redirect still happens, so the click counts and the session does not.
Consent banners
In basic consent mode, Google tags send nothing until the visitor answers the banner, and nothing at all if they decline. Advanced mode sends measurements without cookies instead.
Leaving early
Someone who opens the link and goes back before the page loads is a click with no session. Slow pages widen this gap.
Repeat clicks
Two clicks on the same link within 30 minutes are two clicks but one GA4 session, because a session ends after 30 minutes without activity by default.
Untagged pages
A link to a page that does not run your GA4 tag, such as a marketplace listing or a video, records clicks but no GA4 data.
Which number answers which question
TrimLink clicks
How often was the link opened, and when? Which referrers, countries, devices and browsers did the clicks come from? Use them to compare posts, placements and QR codes.
GA4 sessions and key events
What did visitors do once they arrived? Did they engage, sign up or buy? Use them to judge which campaign brought results.
Watch the gap, not the match. If clicks hold steady and GA4 sessions from that campaign drop, test the link again for a redirect that drops the tags or a page without the tag.
Related guides
Tag your next link the same way every time
Build the tagged URL in the free UTM builder, then shorten it. Save your tags as a UTM template in the dashboard so the whole team uses the same values.
Open the UTM builderBuilders for one channel:
Keep reading
The tools and reading that go with this guide.