How to Track AI Referral Traffic in GA4 (Step by Step)

Track AI referral traffic in GA4 with a custom channel group and regex for ChatGPT, Perplexity, Gemini, Copilot and Claude, then see which visits convert.

By AgenticSEO Editorial TeamUpdated 7 min read
AgenticSEO · Guide
Track AI referral traffic GA4?
  • Named in the answer
  • Cited with a link
  • ?Next: the page that closes the gap

To track AI referral traffic in GA4, create a custom channel group with a new "AI Assistants" channel whose source matches a regex for chatgpt.com, chat.openai.com, perplexity.ai, gemini.google.com, copilot.microsoft.com and claude.ai. Move that channel above Referral so it catches those visits first. Then use the Traffic acquisition report or a free-form exploration to see sessions and key events from AI. Expect an undercount: some AI visits arrive with no referrer and show up as Direct.

This guide uses standard GA4 menus. Google moves labels from time to time, so if a name differs a little in your account, look for the closest match.

TL;DR

  • Create an "AI Assistants" channel in GA4 with a regex for the AI sources, and move it above Referral.
  • Read AI traffic in the Traffic acquisition report, and build an exploration for conversions.
  • Check the limits section before you trust the numbers.

Why track AI referrals on their own?

AI traffic is small for most sites, but it can be valuable. Two public data points:

  • In a Seer Interactive B2B case, ChatGPT traffic converted at 16% versus 1.8% for organic search.
  • Ahrefs reported that 0.5% of its sessions came from AI but gave 12.1% of its sign-ups.

These are single cases. Your numbers may be very different. That is the point of tracking: you want your own data, not someone else's.

By default, GA4 puts these visits in the Referral channel next to every blog and directory that links to you. They are easy to miss. A separate channel fixes that.

AgenticSEO
See which prompts you lose to competitors

AgenticSEO asks ChatGPT and Gemini your buyers' questions several times each week and shows your mention rate per prompt.

Check your AI visibility free

Free plan · No AI key to set up

What you need before you start

  • Editor (or higher) access to the GA4 property.
  • At least one key event set up, such as sign_up or purchase. GA4 now calls conversions "key events".
  • A few minutes to check which AI sources already send you traffic.

Step 1: Check which AI sources you already get

Before you write any regex, look at real data.

  1. Open Reports, then Acquisition, then Traffic acquisition.
  2. In the table, change the main dimension drop-down to Session source.
  3. Set the date range to the last 90 days.
  4. Use the search box above the table to search for chatgpt, then perplexity, gemini, copilot and claude.

Write down the exact source values you see. You may find versions like chatgpt.com or chat.openai.com. If you see other AI tools in your data, add them to the regex in Step 3.

Step 2: Create a custom channel group

  1. Click Admin (the gear icon, bottom left).
  2. Under the property settings, open Data display, then Channel groups.
  3. Click Create new channel group.
  4. Name it something clear, such as Channels with AI.

GA4 starts the new group with a copy of the default channels. You will add one channel to it. The default channel group stays as it is.

Step 3: Add an "AI Assistants" channel with a regex

  1. In your new group, click Add new channel.
  2. Name the channel AI Assistants.
  3. Add a condition: choose Source, then matches regex.
  4. Paste this regex:
.*(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai).*
  1. Save the channel.

How the regex works:

Part What it does
.* at the start and end Allows extra text around the domain, like www.
chatgpt\.com The \. means a real dot, not "any character"
| (the pipe) Means "or" between each domain
( ) Groups the domains into one list

Step 4: Move the channel above Referral

This step is easy to miss, and it matters. GA4 checks channels from top to bottom and puts each session in the first channel that matches. If Referral sits above AI Assistants, the AI visits will land in Referral.

  1. In the channel list, find AI Assistants.
  2. Use the reorder option to move it above Referral.
  3. Save the channel group.

Step 5: See AI traffic in the Traffic acquisition report

  1. Go back to Reports, Acquisition, Traffic acquisition.
  2. In the table's dimension drop-down, pick your new channel group (it appears under the name you gave it).
  3. Find the AI Assistants row.

You now see sessions, engaged sessions and key events for AI traffic next to Organic Search, Direct and the rest. Use the key event column's drop-down to pick a single key event, like sign_up.

Step 6: Build an exploration for conversions

The standard report shows totals. An exploration lets you see which pages AI visitors land on and which ones convert.

  1. Click Explore, then start a Free form exploration.
  2. Under Dimensions, add your custom channel group, Session source and Landing page + query string.
  3. Under Metrics, add Sessions, Engaged sessions, Key events and Session key event rate.
  4. Drag Landing page + query string into Rows.
  5. Add a filter: your channel group exactly matches AI Assistants.
  6. Optional: add Session source to Rows too, so you can compare ChatGPT and Perplexity.

Now you can answer questions like:

  • Which pages do AI engines send people to?
  • Which of those pages lead to sign-ups?
  • Does ChatGPT traffic convert better or worse than Gemini traffic?

Common setup mistakes

Most problems with an AI channel come from a few small errors. Check these if your AI Assistants row is empty or looks too small.

Mistake Symptom Fix
Channel sits below Referral AI Assistants shows zero, Referral still shows chatgpt.com Move AI Assistants above Referral and save
Dots not escaped in the regex Odd sources match, like unrelated domains Use \. for every dot in a domain
Condition on the wrong dimension Nothing matches Use Source, not Medium or Campaign
Viewing the default channel group You do not see the new row Switch the report dimension to your custom group
Typo in a domain One AI tool is missing Compare the regex with the values in Session source

How to read your AI channel numbers

Once data flows in, a few habits help you read it well.

Compare rates, not only totals. AI sessions will likely be a small share of all traffic. That is normal. The useful questions are about rates: what share of AI sessions are engaged, and what share lead to a key event. Compare those rates with Organic Search on the same pages.

Look at landing pages. If most AI visits land on one comparison page or one docs page, that page is doing work for you. Keep it accurate and fresh, and make sure it has a clear next step.

Watch the trend over months. Month-to-month moves on small numbers can be noise. A rise over three months is a better sign than one good week.

Do not judge an engine by clicks alone. One engine may send fewer clicks but still name you often in its answers. Clicks are only one part of AI visibility.

What are the limits of AI referral tracking?

Be honest with yourself about what this data can and cannot show.

Limit What happens What you can do
Missing referrer Copied links, some apps and some browsers send no referrer. GA4 reports these as Direct. Treat your AI channel as a floor, not the full count. Watch Direct to landing pages that AI often cites.
Answers with no click Many buyers read the AI answer and never click. GA4 sees nothing. Track AI answers themselves, with mention rate across repeated runs.
New AI sources New tools appear, and existing ones may change domains. Re-check Session source every month and update the regex.
Small numbers A few sessions can swing the conversion rate a lot. Look at 90-day windows before you draw conclusions.
Branded searches later A buyer sees you in ChatGPT, then searches your name on Google a week later. Watch branded search trends in Search Console alongside this report.

The second limit is the biggest one. GA4 only measures clicks. Most of the value of being in an AI answer may happen with no click at all. That is why GA4 tracking works best next to a direct measure of AI answers. We explain that measure in why AI answers change and how mention rate works.

A monthly AI traffic checklist

  • Check Session source for new AI domains and update the regex.
  • Confirm AI Assistants still sits above Referral.
  • Note AI sessions and key events for the month.
  • List the top 5 landing pages from AI, and whether each one converts.
  • Make sure the top pages are fresh, accurate and have a clear next step.
  • Compare with your AI mention rate trend for the same prompts.

How AgenticSEO uses your GA4 data

AgenticSEO (our product) connects to GA4 or PostHog to read conversions. Pages that appear in converting sessions are ranked first when it picks what to improve next. It also tracks buyer prompts in ChatGPT and Gemini with repeated runs, so you can see AI visibility even when there is no click. Setup takes a few steps in the analytics connection docs. See plans and pricing.

Track your first 10 prompts on the free plan. Each one is asked several times, so you see a share of answers, not a single reply. Start free

Frequently asked questions

ShareXLinkedInAnalyticsGA4AI referral trafficChatGPT

Get cited in ChatGPT and Gemini. Every week.

Agents find the prompts you lose, write fact-checked pages, publish them and measure again. The AI is included.

Read next