Sub topic 1
How AI assistants send visitors to your site
Prerequisites
This chapter assumes you already have the following:
- Basic familiarity with the GA4 interface and the standard Acquisition reports.
- An understanding of what a referrer is (the page a visitor came from) and what a UTM parameter is (a tag such as
utm_sourceadded to a URL). - Editor access to a GA4 property. Administrator access is needed later in this tutorial, when you create channel groups and change some settings.
You don't need to write code to follow this chapter. Later chapters use a short JavaScript snippet, a regular expression and a BigQuery query.
Why this chapter comes first
A visitor who clicks a link in a ChatGPT answer looks, to your site, like any other visitor who clicked a link on another website. GA4 has no built-in "AI assistant" channel, so these visits are spread across several reports. Some are labelled Referral. Some are labelled Direct. Some carry a source name you don't expect.
Before you change any GA4 settings, you need to know how these visits are produced. This chapter covers three things:
- The paths by which an AI assistant sends a person to your site.
- What the browser reveals about each path.
- The difference between a person clicking a link and an automated crawler fetching your pages.
The later chapters in this tutorial cover the GA4 configuration.
The ways an AI assistant produces a visit
An AI assistant answers a question in a chat window. A visit happens only when the person leaves that window and loads one of your pages. These are the common ways that happens.
- Citation links. When an assistant searches the web, it often shows sources next to its answer, as numbered links or small cards. The person clicks one and your page opens in a new tab.
- Inline links. The assistant writes a link into its answer text, such as a product page, a documentation page or a download. The person clicks it.
- Sources panels. Some assistants show a list of every page they consulted. People often click from this list when they want to verify a claim.
- Links inside apps. Mobile and desktop assistant apps may open links in an in-app browser, or hand them to the system browser. The path affects what your site sees.
- Copy and paste. The person copies a URL or a brand name from an answer and types it into the address bar or a search engine. This leaves no trace of the assistant at all.
- Follow-up searches. The assistant mentions your brand. The person then searches for it on Google and arrives as organic search traffic. The assistant influenced the visit, but GA4 cannot see that.
Only paths 1 to 4 can carry a signal that identifies the assistant. Paths 5 and 6 are invisible to your analytics, and you should keep that in mind when you read the numbers.
The mix of paths changes as assistants change their interfaces. Treat any list of behaviours, including this one, as a snapshot. Your own data is the reliable record.
What the browser tells your site
When someone clicks a link, the browser requests your page. Two kinds of information can accompany that request.
The referrer
The browser may send a Referer HTTP header that names the page the click came from. (The spelling is a historical typo in the HTTP standard.) Your page can read the same value in JavaScript as document.referrer. GA4 records it as the page_referrer parameter.
The referrer is not guaranteed. The page that holds the link can control it with a Referrer-Policy setting, and a link can carry rel="noreferrer". Both of these tell the browser to leave the referrer out or reduce it to just the origin. Some in-app browsers also drop it. Whether your visit has a referrer depends on how the assistant's website or app was built, and the assistant's developers can change that at any time.
UTM parameters
Some assistants add tracking parameters to the links they output. The most common example is utm_source=chatgpt.com, which has been added to links in some ChatGPT responses. A visit might land on this URL:
https://www.example.com/guides/pricing?utm_source=chatgpt.comA UTM parameter travels in the URL itself. Redirects, in-app browsers and referrer policies don't remove it, so it is more durable than the referrer. The assistant has to add it, though. You can't count on that for every assistant or every link.
The combinations you will see
| Referrer present | UTM present | What your site can tell |
|---|---|---|
| Yes | No | The assistant's host name is the only clue. |
| Yes | Yes | Two signals that normally agree. |
| No | Yes | The UTM identifies the assistant even without a referrer. |
| No | No | The visit looks like someone typed the URL. GA4 will usually record it as Direct. |
The last row causes most of the measurement gaps described at the end of this chapter.
The path of one click
The diagram below follows a single click from the answer to your page, and shows where each signal is added or lost.
The signals can be lost at two places. The click step is where the referrer can be dropped. The page-load step is where a redirect on your own site can strip UTM parameters before the GA4 tag reads the URL. A redirect from http to https, or from a short URL to a long one, is a common cause. Check your own redirects before you blame the assistant.
Which hosts to expect
Assistants send visitors from a small set of host names. This table lists the hosts used in this tutorial's examples. Verify each one against your own data in a later chapter, because assistants rename and add domains.
| Assistant | Referrer host names commonly seen |
|---|---|
| ChatGPT | `chatgpt.com`, `chat.openai.com` (older) |
| Gemini | `gemini.google.com` |
| Perplexity | `perplexity.ai`, `www.perplexity.ai` |
| Microsoft Copilot | `copilot.microsoft.com` |
| Claude | `claude.ai` |
Google's AI features inside Search (AI Overviews and AI Mode) are different. A click from them usually arrives from google.com, so GA4 files it under Google organic search. You can't separate it from ordinary search clicks with referrer data alone. The standalone Gemini app and website, on the other hand, use their own host name, as the table shows.
AI crawlers are not visitors
Two different kinds of traffic come from AI companies, and only one of them appears in GA4.
- Referral visits are people. A person clicks a link, a browser loads your page and the GA4 JavaScript tag runs. GA4 records a session.
- Crawler requests are automated programs. They fetch your pages to train a model, to build a search index or to answer a question live. Most crawlers don't run JavaScript, so the GA4 tag never fires and GA4 records nothing.
This has a practical consequence. A rise in crawler activity shows up in your server logs or CDN reports, not in GA4. A drop in GA4 AI referrals doesn't prove the crawlers stopped visiting, and the reverse is also true. A page can be read by an assistant thousands of times and produce only a few clicks.
Some assistants also fetch a page on the user's behalf in real time. The server logs show that request, but no person opened the page in a browser, so GA4 sees no visit. Only a click by a person produces a GA4 session.
| Row | Referral visit | Crawler or fetch request |
|---|---|---|
| Who triggers it | A person clicking a link | An automated program |
| Runs the GA4 tag | Yes | Usually no |
| Where you see it | GA4 reports | Server logs, CDN or hosting analytics |
| What it tells you | People are following citations to you | Your content is being read by AI systems |
A later chapter in this tutorial covers how to tell the two apart in more detail.
Common errors at this stage
- Assuming "no AI traffic" means no AI visits. Missing referrers push AI visits into Direct. The count of visits identified as AI is a lower bound.
- Assuming every Referral from a known host is an assistant. A host name can serve more than one product, and some hosts belong to a company that also runs a search engine. Check the exact host.
- Treating citations as clicks. Being cited in an answer does not mean anyone clicked. Most answers are read without a click.
- Comparing AI numbers with organic search directly. The AI figure is undercounted and the organic figure is mostly complete. A ratio between them will mislead you.
- Looking for crawlers in GA4. They don't appear there. Use server logs.
- Testing once and trusting the result. Assistants change their link behaviour without announcement. Re-check periodically.
What comes next
The next chapter looks at how GA4 turns the referrer and UTM values you have just seen into session source, session medium and the default channel group. That explains why AI visits currently land in Referral, Direct or an unexpected source, and prepares you to separate them into their own channel.
Exercise
A visitor reads a ChatGPT answer that mentions your company, copies the company name, searches for it on Google and clicks your organic result. Which channel does GA4 record, and can you tell from GA4 data that ChatGPT played a part?
Show answer
GA4 records the visit as Organic Search, with source google and medium organic. The page_referrer is a Google URL and no UTM parameter points to ChatGPT. You can't tell from GA4 data that ChatGPT influenced the visit. It is one of the invisible paths described above.
Exercise
Your server logs show 4,000 requests from an AI company's crawler last week. GA4 shows 12 sessions from that company's assistant in the same week. Is GA4 undercounting the crawler, and what do the two numbers each measure?
Show answer
GA4 is not undercounting the crawler. It measures sessions from people whose browsers ran the GA4 tag, which here is 12 click-through visits. The server logs measure every HTTP request, including automated fetches that do not run JavaScript. The two numbers describe different things and should not be compared as if they were the same metric.
Exercise
A link in an assistant answer ends with ?utm_source=chatgpt.com, but your site redirects every URL through a rule that removes the query string before the page loads. What happens to attribution, and where would you fix it?
Show answer
The UTM parameter is removed before the GA4 tag reads the URL, so GA4 has to rely on the referrer. If the referrer is also missing, the visit is recorded as Direct. The fix is on your own site: change the redirect rule so that it keeps the query string, then test the link again.