Sub topic 5
Why some AI visits look like Direct traffic
This chapter assumes you can read GA4's standard acquisition reports. It also assumes you know what an HTTP referrer is and what UTM parameters are. It explains why a share of AI assistant visits never shows an AI source in GA4, how to recognise the pattern in your data, and what you can do about it.
What "Direct" means in GA4
GA4 does not label a visit "Direct" because the visitor typed your address. It uses (direct) as the source and (none) as the medium when it finds no usable attribution signal for the session. That signal can be a referrer, a UTM parameter, or a Google Ads click identifier such as gclid.
The Default Channel Group then maps (direct) / (none) to the Direct channel. So Direct is a catch-all for visits whose origin GA4 could not determine. That includes visits that did have an origin which was lost along the way.
An AI assistant visit can therefore end up in Direct without anyone typing a URL. The sections below cover the causes.
How attribution gets lost
GA4 reads the referrer from document.referrer in the visitor's browser, along with the query string of the landing page URL. A visit loses attribution when both are empty or unusable at the moment the page loads. Four things commonly cause this with AI assistants.
The browser sends no referrer
A browser sends a Referer header, which document.referrer reflects, only when the referring page's policy allows it. Several cases suppress it:
- The assistant page sets a
Referrer-Policyofno-referrer. Then no referrer is passed at all. - The link has
rel="noreferrer". Many chat interfaces add this attribute to links in generated answers, which removes the referrer for that click. - The visitor moves from an HTTPS page to an HTTP page. Browsers drop the referrer on this downgrade.
With strict-origin-when-cross-origin, the browser default in current browsers, you still receive the origin (for example https://chatgpt.com/). You do not receive the full path. That is enough for GA4 to identify the source. A policy of no-referrer removes even that.
The visit starts in a native app
Desktop and mobile assistant apps often open links in an in-app browser or hand them to the default browser. Neither path reliably passes a referrer. An app that launches your URL through the operating system usually behaves like a person pasting a link into the address bar. GA4 sees no referrer.
The link is copied rather than clicked
Assistants often show a URL as plain text. A user copies it and pastes it into a new tab. The new tab has no referrer. This is common when an answer cites a source without a clickable link, or when a user moves from a phone app to a laptop.
Redirects or interstitials strip the signal
If your site redirects the landing URL, for example from http to https or from a short URL to a canonical page, the referrer can change on the way. A poorly built redirect, especially a client-side one, can also drop the query string. If the redirect removes UTM parameters, the tagging you added never reaches GA4.
Direct versus Unassigned
The two buckets mean different things, and confusing them leads to wrong fixes.
| Label | What it means | Typical cause |
|---|---|---|
| Direct | Source is `(direct)`, medium is `(none)`. GA4 found no signal. | Missing referrer, copied link, app launch |
| Unassigned | GA4 found a source and medium but no channel rule matches them. | A custom or malformed `utm_medium`, or an unusual source and medium pair |
| Referral | Medium is `referral`. GA4 found a referrer from another site. | A normal clickable link that passed its referrer |
The distinction matters for AI traffic. If a visit shows chatgpt.com / referral, attribution worked. You do not need to repair it, only to group it. If a visit shows (direct) / (none), no setting inside GA4 can recover the source afterwards. You can only change what happens before the visit arrives, or estimate the effect statistically.
A related quirk: ChatGPT's UTM tag
Some assistants append their own utm_source to outbound links. ChatGPT, for example, has added utm_source=chatgpt.com to links in some interfaces. When that parameter survives, GA4 reads it and records the session source as chatgpt.com. The medium depends on whether a utm_medium is present.
Without a utm_medium, GA4 may record the visit as chatgpt.com / (not set). This pairing matches no Default Channel Group rule, so it can appear as Unassigned. When you review sources, check both the source and the medium. The behaviour of assistant-added parameters changes over time and varies by product and interface, so verify against your own data rather than assuming it.
Recognising the pattern in your data
You cannot see a lost referrer directly. You can look for indirect evidence.
- Compare the landing pages. In Reports, open the landing page report and add a secondary dimension of Session default channel group. Pages that assistants tend to cite, such as guides and documentation, may show Direct sessions that look unlike the usual direct traffic for your site, which is mostly your homepage.
- Watch the trend. A rise in Direct sessions on deep content pages, with no email or offline campaign to explain it, is a hint that referrers are being lost. Compare against the period when AI referral traffic started to grow.
- Look at the new-user share. Direct visits to deep pages from new users behave like discovery visits, not return visits.
- Check the device mix. If the extra Direct traffic is concentrated on mobile, native app launches are a likely cause.
None of these proves that a given session came from an assistant. Treat them as signals that support an estimate.
What you can do
You cannot repair attribution after the visit is recorded. These steps improve what you capture and what you infer.
Tag links you control
Where you control the link, add UTM parameters. This applies to links you publish in places an assistant may pick up, such as a profile, a listing, or a feed you submit. A tagged URL such as https://example.com/guide?utm_source=chatgpt.com&utm_medium=ai_assistant carries its source through copy and paste, since the parameters are part of the URL. You do not control which URL an assistant chooses to show. This helps only for links you place yourself.
Keep your own redirects clean
Make sure redirects preserve both the query string and, where possible, the referrer. Use server-side 301 redirects that pass the query string through. Test a landing URL with parameters and confirm it arrives intact. The test below reads the parameters on the final page, so it shows what GA4 will see.
const params = new URLSearchParams(window.location.search);
console.log('referrer:', document.referrer || '(empty)');
console.log('utm_source:', params.get('utm_source') || '(none)');
console.log('utm_medium:', params.get('utm_medium') || '(none)');Run this in the browser console on a page you reached by clicking a link, then again after pasting the same link into a new tab. The first run typically shows the referrer. The second shows (empty). That contrast is the whole problem in miniature.
Capture the landing signals yourself
Where the referrer exists but GA4 does not use it as you expect, the custom event from a later chapter records it. When the referrer is empty, no event can recover it, so no code fixes the Direct case.
Segment the likely candidates
Build a separate exploration segment of Direct sessions whose landing page is a content page and whose device is mobile. Keep this segment labelled "possible AI, unconfirmed" and report it beside the confirmed AI channel, never merged into it.
Common errors
- Treating Direct as human typing. The label describes missing data, not behaviour.
- Assuming the custom channel group fixes this. A channel group sorts sessions by source and medium. A session with
(direct) / (none)has nothing for the rule to match. - Adding UTM parameters to internal links. Tagging links between pages on your own site starts a new session and overwrites the real source. Use UTMs only on links that bring visitors from outside.
- Using inconsistent UTM spelling.
AI_Assistant,ai-assistant, andai_assistantare three different mediums. Pick one lowercase value and keep it. - Expecting a rate. No public figure tells you what share of AI visits lose their referrer. It varies by assistant, interface, and device, so measure the pattern in your own property.
Summary of decision criteria
| Situation | Action |
|---|---|
| Source shows an AI host with medium `referral` | Group it in your custom channel group |
| Source shows an AI host with an odd or missing medium | Add a channel rule on source alone, or check for Unassigned |
| Source is `(direct)` and you control the link | Add UTM parameters and republish |
| Source is `(direct)` and you do not control the link | Accept the loss; track a labelled estimate segment |
| UTM parameters vanish between click and page view | Fix the redirect |
Exercise
A page of your documentation shows a rise in Direct sessions from new mobile users. No email or offline campaign ran. A teammate proposes a channel group rule that moves all (direct) / (none) sessions to "AI Assistants". Explain why this will not work as intended and what you would do instead.
Show answer
A channel rule matches on source and medium. Direct sessions carry (direct) and (none), so the rule would either match nothing about AI or, if forced to match everything, move bookmarks, typed addresses, and untagged links into the AI channel and overstate AI traffic. The referrer is already lost, so GA4 cannot recover it. Instead, keep Direct as it is, build a labelled exploration segment (Direct, new users, mobile, content landing pages) as an unconfirmed estimate, and report it next to the confirmed AI channel. Tag links you control with UTM parameters, and check that your redirects keep the query string.
Exercise
You test a landing page. Clicking an assistant's link shows document.referrer as https://chatgpt.com/. Pasting the same URL into a new tab shows an empty referrer. Which of the two visits would GA4 record as chatgpt.com / referral, and which as (direct) / (none), assuming no UTM parameters?
Show answer
The click would be recorded as chatgpt.com / referral because the referrer reached GA4. The pasted visit would be recorded as (direct) / (none) because no referrer and no UTM parameters are present.