Sub topic 14
Troubleshooting misclassified traffic
This chapter assumes you can open the Traffic acquisition report and an exploration in GA4. It also assumes you know how source, medium and campaign feed the default channel group, and what a UTM parameter is. Here you will use that model to find out why a session landed in the wrong channel, and decide whether to fix the tagging, fix the configuration, or accept the result.
Start from the rules, not from the report
Misclassification is almost always one of three things:
- The session arrived with the wrong source and medium values.
- The session arrived with no usable values, so GA4 recorded Direct.
- The values were fine, but they matched no rule, or matched an earlier rule than you expected.
Channel assignment is a pure function of the session's source, medium and campaign, plus some Google Ads fields. The channel never needs debugging by itself. Always look at the source and medium that produced it.
In the Traffic acquisition report, change the primary dimension to Session source / medium, or add it as a secondary dimension to Session default channel group. In an exploration, put both dimensions in rows. You are now comparing the input with the output.
Symptom table
| Symptom | Likely cause | Where to check | Fix |
|---|---|---|---|
| Tagged email clicks show as Direct | Link opened in an app that strips parameters, or a redirect dropped the query string | Open the link in a browser and compare the final URL | Remove the redirect or make it pass the query string |
| Your own domain appears as a Referral | Cross-domain traffic without a linker, or a payment gateway returning users | Session source / medium | Configure cross-domain measurement; add unwanted referrals |
| Paid campaign shows as Organic Search | Source is a search site but the medium does not look paid | Session source / medium | Use `cpc` or another paid medium |
| Campaign shows as Unassigned | Medium matches no rule, such as `utm_medium=promo` | Session medium | Use a standard medium or add a custom channel group |
| Same campaign split across rows | Mixed case or spelling, such as `Email` and `email` | Session source / medium | Standardize on lowercase |
| Google Ads traffic is not Paid Search | Auto-tagging off, accounts not linked, or `gclid` lost | Admin, product links; landing URL | Enable auto-tagging and link the accounts |
Direct traffic that should not be direct
Direct is the fallback for sessions with no source information. It is not a record that someone typed your address. Before you trust a large Direct number, check these causes:
- Stripped parameters. Link shorteners, redirects and some in-app browsers drop the query string. GA4 then sees a bare landing page with no referrer.
- Missing referrer. Moving from an HTTPS page to an HTTP page, or following a link in a PDF or desktop mail client, sends no referrer. Without UTMs, that visit is Direct.
- Lost session continuity. If a visitor returns after the 30-minute session timeout, GA4 evaluates the new session again, and a bookmark or autofill visit becomes Direct.
The remedy for owned campaigns is tagging every link you control. For traffic you do not control, accept that some of it will be Direct.
Referral that should be something else
A Referral row for your own site, a payment provider or an authentication service means the visitor left your tracked site and came back. GA4 starts a new session with the other domain as source.
- For multiple domains you own, set up cross-domain measurement in the data stream settings, so the visitor keeps the original session.
- For third parties that only bounce the visitor back, open Admin > Data streams > your stream > Configure tag settings > List unwanted referrals and add their domains. GA4 then ignores them as a source.
- Check whether the referral appears on a limited set of landing pages. Those pages often show where the link or redirect lives.
Paid traffic that shows as organic
This is the most common surprising result, and it follows from rule order. GA4 evaluates paid rules before organic rules. A session from a known search site reaches Paid Search only if the medium also matches the paid pattern. A session from google with utm_medium=banner fails the paid test and falls through to Organic Search.
The same happens for social. A link tagged utm_source=facebook&utm_medium=ads has a recognized social source but a medium that does not look paid, so it is classified as Organic Social. A medium of paid_social or cpc would put it in Paid Social.
The chapter's simplified classifier from earlier shows the effect. Run it with different mediums and watch the output change:
import re
SEARCH_SOURCES = {"google", "bing", "duckduckgo"}
PAID_MEDIUM = re.compile(r"^(.*cp.*|ppc|retargeting|paid.*)$")
def classify(source, medium):
source = (source or "").lower()
medium = (medium or "").lower()
if source == "(direct)" and medium in ("(none)", "(not set)"):
return "Direct"
if medium in ("email", "e-mail", "e_mail", "e mail"):
return "Email"
if source in SEARCH_SOURCES and PAID_MEDIUM.match(medium):
return "Paid Search"
if source in SEARCH_SOURCES or medium == "organic":
return "Organic Search"
if medium in ("referral", "app", "link"):
return "Referral"
return "Unassigned"
for medium in ("cpc", "ppc", "paid-search", "banner", "ads"):
print(f"google / {medium:12} -> {classify('google', medium)}")Only the first three mediums reach Paid Search. banner and ads are classed as Organic Search. This is a simplified model, and the real definitions cover more channels and a larger source list. The ordering behavior is the same.
Unassigned versus (not set)
These two are easy to confuse. Unassigned is a channel value: GA4 had a source and a medium, and no rule matched them. (not set) means a dimension has no value at all. If the default channel group shows Unassigned, look at the medium. It is usually a custom word such as promo, partner, or a typo.
Check for these causes, in this order:
- A made-up medium. Change the tag to a standard value, or create a custom channel group.
- A medium with extra characters or spaces, such as
emailore-mails. - Data that is still processing. Recent sessions can briefly show Unassigned or change classification, so recheck after 24 to 48 hours before you change anything.
- Events sent through the Measurement Protocol without session or traffic source details. Those events cannot be assigned to a channel.
Auto-tagging problems
If Google Ads traffic is not in Paid Search, the cause is usually in the account setup, not the tags:
- Auto-tagging is off in the Google Ads account, so no
gclidis added. - The Google Ads and GA4 properties are not linked, so GA4 cannot read the campaign data attached to the click.
- A redirect on the landing page removes
gclidbefore the GA4 tag runs. - Manual UTMs on an auto-tagged URL conflict with the Google Ads values. Avoid mixing them unless you have a clear reason.
Test by clicking a live ad, or a preview with a test gclid where permitted, and confirm the landing URL contains the parameter at the moment the page loads.
Check tags before you publish
Most of these problems can be caught before a campaign launches. This script checks a URL for missing or inconsistently formatted UTM values:
from urllib.parse import urlparse, parse_qs
REQUIRED = ("utm_source", "utm_medium", "utm_campaign")
def lint(url):
problems = []
params = parse_qs(urlparse(url).query)
for key in REQUIRED:
if key not in params:
problems.append(f"missing {key}")
for key, values in params.items():
if not key.startswith("utm_"):
continue
value = values[0]
if value != value.lower():
problems.append(f"{key} has uppercase letters: {value}")
if " " in value:
problems.append(f"{key} contains a space: {value}")
return problems
urls = [
"https://www.example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026",
"https://www.example.com/spring-sale?utm_source=Newsletter&utm_medium=E-mail",
]
for url in urls:
print(url)
print(" ", lint(url) or "ok")The first URL passes. The second reports a missing campaign and two uppercase values.
When to stop fixing and build a custom group
Some traffic is correct but does not fit the default channels, for example partner programs or affiliate networks with their own mediums. Rather than rewriting every link, create a custom channel group in Admin and put your own rules above the defaults. Custom channel groups apply to historical data in reports and explorations, so you can compare past periods. Keep them for genuine business categories. Do not use them to hide a tagging error that you can fix at the source.
Exercise
A campaign link uses utmsource=google and utmmedium=display_ads. In the Traffic acquisition report the sessions appear under Organic Search. Explain why, and name one change that would move them to Paid Search.
Show answer
The source is a recognized search site, but the medium displayads does not match the paid pattern, which needs values such as cpc, ppc, retargeting, or something starting with paid. Paid rules are checked before organic rules, so the session falls through to Organic Search. Changing the medium to cpc (or paiddisplay, if you also want a descriptive name) lets it match the paid rule.
Exercise
Sessions from your checkout provider's domain show as Referral and start a new session after payment, so the conversion is credited to the provider. What do you change, and where?
Show answer
Add the provider's domain to the list of unwanted referrals in the data stream's tag settings (Admin > Data streams > the stream > Configure tag settings > List unwanted referrals). GA4 then ignores that domain as a source, and the returning session keeps its original attribution.