Skip to content

Track AI referral traffic in GA4

See sessions from ChatGPT, Perplexity, Gemini and others in GA4.

  • Lesson 6 of 6
  • Intermediate
  • 6 min read
  • 2:39 video
  • Checked against the product 2026-11-03

Listen to this lesson · 2:38

In shortVisits from ChatGPT, Perplexity, Gemini, Claude and Copilot reach GA4 with a session source such as chatgpt.com, perplexity.ai or gemini.google.com, mixed into Referral (or Direct when no referrer is passed). To see them as one number, filter or segment on session source with a regex, or add an AI channel group in GA4 Admin. In AI Rank Lab, the GA4 overview's Top AI Sources chart and Analytics chat give you the same view without building reports.

How to use it in AI Rank Lab

  1. Find it in the dashboardAnalytics → Google Analytics 4 → GA4 overview
  2. Watch while you workOpen GA4 overview from here and the video plays in a small corner window of your dashboard, so you can follow each step on your own data. Expand it or go full screen any time. Open GA4 overview with the video
  3. Turn it into a routineThese playbooks show where this fits in a repeatable workflow:

What AI referral traffic is

When an AI assistant answers a question, it often links to the pages it used. Some people click. Those visits are AI referral traffic: real people, sent by an AI answer. They're worth tracking because they show which pages AI engines cite and whether those citations turn into visits and sales.

GA4 already records these visits. The problem is that it files them under the Referral channel, next to forums and partner sites, so nobody notices them. This lesson shows how to pull them out in GA4 itself, and how AI Rank Lab helps.

Which sources to look for

AssistantSession source in GA4Notes
ChatGPTchatgpt.com (older visits: chat.openai.com)Many ChatGPT links add utm_source=chatgpt.com, so the source shows even without a referrer
Perplexityperplexity.aiSometimes with www.
Geminigemini.google.comSeparate from google / organic
Claudeclaude.ai
Microsoft Copilotcopilot.microsoft.comCopilot inside Bing search can arrive as bing.com
Google AI Overviews and AI Modegoogle / organicCan't be separated from normal Google results in GA4
Treat the number as a floor

Some AI apps and in-app browsers pass no referrer, so the visit lands in (direct) / (none) and no tool can reliably attribute it. Clicks from Google AI Overviews look like ordinary organic search. Report AI sessions as "at least", and say how you counted them.

Build the view in GA4

All of these use one regex on session source. Wrapping it in .* makes it work whether a GA4 field does full or partial matching:

.*(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|claude\.ai|copilot\.microsoft\.com).*

  1. Quick check in a standard reportIn GA4, open Reports → Acquisition → Traffic acquisition. Change the primary dimension to Session source / medium and type "chatgpt" in the search box. This answers "do we get any?" in a minute.
  2. Build an explorationOpen Explore → Free form. Add the dimensions Session source and Landing page + query string, and the metrics Sessions, Engaged sessions and Key events. Add a filter: Session source matches regex, with the regex above. Put Session source in rows to compare assistants, or Landing page to see which pages AI sends people to.
  3. Save a segment to compareIn the exploration, create a session segment with the condition Session source matches the same regex. Apply it next to an Organic Search segment to compare engagement rate and key events side by side.
  4. Add an AI channel (optional, needs Editor)In Admin → Data display → Channel groups, create a new channel group (it starts as a copy of the default). Add a channel such as "AI assistants" with the condition Source matches the regex, then move it above Referral so GA4 assigns those sessions to it first. Save, then pick this channel group in your acquisition reports.
Extend the list as new assistants appear

Check your Referral channel every month or so for new AI domains and add them to the regex in every place you use it: the exploration filter, the segment and the channel group.

How AI Rank Lab helps

  1. Read Top AI Sources in the GA4 overviewOpen Analytics → Google Analytics 4 → GA4 overview. Top AI Sources lists up to five AI session sources for the chosen date range, and Traffic Distribution shows their share of all sessions. It's free and needs no setup in GA4. Its AI list includes "bing", so plain Bing search visits are counted too.
    GA4 overview showing the Top AI Sources horizontal bar chart with chatgpt.com, perplexity.ai and gemini.google.com bars, next to the Traffic Distribution donut.
    AI session sources from your own GA4 property.
  2. Ask follow-up questions in Analytics chatIn Analytics → Google Analytics 4 → Analytics chat, ask "top 10 landing pages for sessions from chatgpt.com in the last 28 days" or "engagement rate by session source for perplexity.ai and google". Each message costs credits; see Analytics chat.
    Analytics chat answer listing landing pages and sessions for chatgpt.com as a small table.
    Landing pages for one AI source, answered from GA4.
  3. Connect clicks to citationsVisits are the end of the chain. AI search → Brand visibility → Citations shows which of your URLs AI engines cite for the prompts you run. When citations rise but AI sessions don't, look at the cited pages' titles and first paragraphs.

The AI bot tracker is a separate measure

AI Rank Lab's AI bot tracker (AI search → Monitoring and reports → AI bot tracker) does not read GA4. It uses its own JavaScript tag on your site, decides whether a visit came from an AI assistant by its referrer or user agent, and shows AI-referred visits per page and per assistant. It stores UTM parameters but doesn't use them to classify, so a ChatGPT click that carries only utm_source=chatgpt.com and no referrer isn't counted as AI there. Because it's a browser tag, it sees people and agents that run JavaScript, not crawlers that fetch pages without running scripts. Its numbers won't match GA4 exactly: the two count differently, and consent settings or ad blockers affect them differently. Use GA4 as your official figure and the tracker for the per-page view. See Read the AI bot tracker.

What it costs

Check yourself

1. Where do clicks from Google AI Overviews show up in GA4?
2. Why build your AI regex on session source rather than on the page referrer?
3. Your AI bot tracker shows different AI visit numbers from GA4. Which statement is right?

0 of 3 answered.

Progress is saved in this browser.

Screenshots and video come from an AI Rank Lab demo account. Where a screen needs data that account doesn't have, such as a connected Google account or real visitors, it shows fictional example.com data.

Transcript
In this lesson you'll learn to track visits from AI assistants in GA4. When ChatGPT, Perplexity or Gemini answers a question, it often links to its sources, and some people click. That's AI referral traffic. GA4 already records it, but it files it under Referral, next to forums and partner sites, so it's easy to miss. Start by knowing what to look for. ChatGPT shows up as chatgpt dot com, and many of its links add a UTM tag with the same name. Perplexity shows as perplexity dot ai, Gemini as gemini dot google dot com, Claude as claude dot ai, and Copilot as copilot dot microsoft dot com. Two limits to remember. Some AI apps pass no referrer at all, so those visits land in Direct. And clicks from Google's AI Overviews look like normal Google organic traffic. So treat your AI number as a floor, and say so in reports. Now build the view in GA4. Everything uses one regular expression on session source, listing those domains. For a quick check, open the Traffic acquisition report, switch to session source and medium, and search for chatgpt. For the full picture, open Explore and create a free form exploration. Add session source and landing page as dimensions, and sessions, engaged sessions and key events as metrics. Filter session source with your regex. Now you can see which assistants send visitors and which pages they land on. Save the same condition as a segment, and compare it with organic search. And if you have editor access, add an AI assistants channel in Admin, under channel groups, and move it above Referral. AI Rank Lab helps in three ways. The GA4 overview has a Top AI Sources chart that does this split for you, for free. Note that it counts Bing as AI. Analytics chat answers follow-up questions, like which pages ChatGPT visitors land on. And the Citations page shows which of your URLs AI engines cite, so you can connect clicks back to citations. Finally, the AI bot tracker is a separate measure. It's AI Rank Lab's own browser tag, not GA4. It shows AI-referred visits per page, but it only sees visitors that run JavaScript, not crawlers. Its totals won't match GA4, and that's expected. That's the end of the GA4 course. Next, try the playbooks, starting with how to win a prompt you're losing.

Put the lesson to work

Paste your site and get a free SEO, AEO and GEO audit with the fixes, then come back to the next lesson.