Skip to content
SEO & AI Search

How to Track ChatGPT and AI Traffic in Google Analytics 4 (Step by Step)

Track ChatGPT, Perplexity, Gemini and Copilot visits in Google Analytics 4: check the AI assistant channel, build a custom channel group and measure leads.

ParvesFounder and Creative DirectorUpdated 5 min read
How to Track ChatGPT and AI Traffic in Google Analytics 4 (Step by Step)

Quick answer

To track ChatGPT and other AI traffic in Google Analytics 4, first check whether the built-in AI assistant channel appears in your Traffic acquisition report. Then create a custom channel group with an AI channel above Referral that matches sources such as chatgpt.com, perplexity.ai, gemini.google.com, claude.ai and copilot.microsoft.com, and compare its key events with your other channels.

More buyers now start with an AI assistant before they ever open Google. They ask ChatGPT for the best options, Perplexity for a comparison, or Gemini for an explanation, then click through to the sites those tools cite. If you want to track ChatGPT traffic in Google Analytics 4, along with the other AI tools, you need to know where those visits land and how to group them so you can see what they are worth.

This guide shows the setup we use on our own site and for clients. It takes about fifteen minutes and needs editor access to your GA4 property.

Where does AI traffic show up in GA4 today?

When someone clicks a link inside an AI tool, one of three things happens:

  1. The tool passes a referrer, and GA4 records the session with a source like chatgpt.com or perplexity.ai. Until recently this landed in the Referral channel, mixed with every other website that links to you.
  2. The tool adds its own tag to the link. ChatGPT often appends utm_source=chatgpt.com to the links it shows, which helps GA4 attribute the visit even when the referrer is missing.
  3. No referrer at all. Some apps open links in a way that hides where the visitor came from. GA4 counts these as Direct.

Google has also added an AI assistant channel to GA4's default channel group, so some properties now show ChatGPT and similar tools as their own line. Reports from people testing it suggest it does not yet catch every AI tool, which is why the custom channel group below is still worth building.

Step 1: Check what you already have

  1. In GA4, open Reports, then Acquisition, then Traffic acquisition.
  2. Set the date range to the last 90 days.
  3. In the table, look at the Session primary channel group column. If you see AI assistant, the built-in channel is active.
  4. Change the dimension to Session source using the dropdown above the table, and search for chatgpt, perplexity, gemini, claude and copilot.

Write down what you find. This is your baseline, and it shows which AI tools already send you visits.

Step 2: Create a custom channel group with an AI channel

A custom channel group lets you define your own channel called AI Search and decide exactly which sources belong in it.

  1. Go to Admin (the gear icon), then under Data display, open Channel groups.
  2. Click Create new channel group. Give it a name like Channels with AI.
  3. GA4 copies the default channels into your new group. Click Add new channel.
  4. Name the channel AI Search.
  5. Set the condition to Session source, matches regex, and paste this pattern:
.*(chatgpt\.com|openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|deepseek\.com|meta\.ai|grok\.com).*
  1. Save the channel.
  2. In the list of channels, drag AI Search above Referral. GA4 checks channels from top to bottom and stops at the first match, so if Referral sits above it, your AI channel will stay empty.
  3. Save the channel group.

Match on source only and ignore the medium. AI tools send a mix of referral, (not set) and other mediums, and a source-only rule catches them all in one line.

GA4 allows only a limited number of custom channel groups per property, so name this one clearly and use it as your main view.

Step 3: Check the regex against real sessions

Before you trust the numbers, test the pattern:

  1. Open Explore and start a Free form exploration.
  2. Add the dimensions Session source and your new channel group (it appears as a dimension once saved).
  3. Add the metric Sessions.
  4. Filter Session source to contain gpt or perplexity, and confirm every row lands in AI Search.

If a new AI tool starts sending visits, add its domain to the pattern. Check the list every few months.

Step 4: Measure what AI visitors actually do

Traffic alone tells you little. What matters is whether those visitors become enquiries.

  1. Make sure your important actions are marked as key events in GA4, such as form submissions, phone clicks and WhatsApp clicks. Our GA4 setup guide shows how.
  2. In Traffic acquisition, switch the table to your custom channel group.
  3. Compare AI Search with Organic Search and Paid Search on Engagement rate, Key events and Session key event rate.
  4. Open the Landing page report filtered to AI Search to see which pages AI tools send people to.

In our experience, AI visitors are few but unusually warm. They arrive having already read a summary of you, so they often go straight to a service page or the contact form.

Step 5: Build a simple monthly AI report

Once a month, note four numbers in a spreadsheet:

Metric Where to find it
AI Search sessions Traffic acquisition, custom channel group
AI Search key events (leads) Same report, key events column
Top 5 AI landing pages Landing page report filtered to AI Search
Branded searches in Google Search Console, queries containing your brand name

The fourth one matters because AI tools influence people who never click. Someone reads about you in ChatGPT, then searches your name on Google. A steady rise in branded searches is often the clearest sign that AI visibility is working.

What GA4 cannot tell you

  • Google AI Overviews and AI Mode. Clicks from these arrive as google / organic. Google Search Console counts them inside its normal web search data, but you cannot separate them in GA4.
  • Answers that mention you without a link. If ChatGPT recommends your business by name and the reader calls you, no analytics tool sees the AI part.
  • Hidden referrers. Visits from some apps arrive as Direct. Expect AI traffic in GA4 to be an undercount.

To see whether AI tools mention you at all, you have to ask them directly. Run the questions your customers would ask, such as "best packaging designer for FMCG brands in India", in ChatGPT, Perplexity and Gemini every month, and note whether you are named and which page is cited.

How to get more AI traffic once you can measure it

Tracking shows you the starting point. Growing it is a content and reputation job:

Some site owners also add an llms.txt file for AI tools. We explain what it does, and what it does not do, in our llms.txt guide.

If you want a team to set up the measurement and grow your visibility in AI answers, see our AI search optimization service.

Work with us

AI Search Optimisation (GEO) from The Coral Flow

See what AI says about you. We ask five leading AI assistants the questions your buyers ask and send you the answers, with what to fix first.

Run my AI audit

Frequently asked questions

Does GA4 track ChatGPT traffic automatically?

Partly. Google has added an AI assistant channel to the default channel group, and ChatGPT adds a source tag to many of the links it shows. But some AI tools are missed and some visits arrive without any referrer, so a custom channel group gives a more complete view.

Can I see traffic from Google AI Overviews in GA4?

No. Clicks from AI Overviews and AI Mode arrive as normal Google organic traffic. Google Search Console includes them in the web search Performance report, but they are not separated out in GA4.

Why is my AI traffic lower than I expected?

Some AI apps open links without passing a referrer, so those visits land in Direct. People also often read an AI answer and then search for your brand on Google, which shows up as organic or direct. AI influence is larger than AI referral traffic.

Will a custom channel group change my old data?

Custom channel groups apply to past data in your reports, so older ChatGPT visits that sat in Referral are reclassified too. Your raw data is not changed.

Written by

Parves, Founder and Creative Director

Leads strategy and creative direction at The Coral Flow in Chennai, across web, search and content for brands in India and abroad.

About the author

Share this guide

Let's talk

Want us to do this for you?

Tell us what you are working on. We reply within one working day with honest advice and next steps.