How to Track AI Search Traffic in GA4 (ChatGPT and Perplexity)

To track AI search traffic in GA4, create a custom channel group that matches the referrals from AI assistants, then check that channel in the acquisition reports. Treat the numbers as a floor, not a full count.

Editorial title card reading "How to Track AI Search Traffic in GA4" beside the orange ZeroRaised mark.

Key takeaways

  • A GA4 custom channel group can collect visits from AI assistants into one channel, using a regex that matches their referral sources.
  • Put the AI Assistants channel above Referrals in the channel list, or the visits may be counted in the wrong place.
  • Some AI visits arrive with no referrer, so GA4 will undercount them. Server logs help you see more.
  • Review the regex every few months, because assistants and their referral hostnames change.
  • Compare the AI channel with landing pages and conversions, not with a single headline number.
On this page 8
  1. What does a GA4 custom channel group do?
  2. How do you set up an AI Assistants channel?
  3. Which reports should you check?
  4. What does GA4 miss?
  5. How do server logs help?
  6. What is a simple monthly audit?
  7. What this guide cannot promise
  8. Sources

Short answer: To track AI search traffic in Google Analytics 4, create a custom channel group that puts visits from AI assistants into one channel, then read that channel in the acquisition reports. Google's documentation describes this method and says to place the new channel above Referrals. The result is a floor, not a full count, because some AI visits arrive with no referrer and some quoted links are never clicked. Cross-check the numbers with landing pages, conversions and, if you can, server logs that show the assistant bots by name.

This guide is for a small team that wants a working setup in an afternoon. It covers the channel group, the reports to check, the limits, and a simple audit you can repeat.

TL;DR

  • Build a custom channel group in GA4 with a regex that matches assistant referrals.
  • Put the AI channel above Referrals so the rule is applied first.
  • Expect undercounting: referrer gaps and unclicked citations are normal.
  • Check landing pages and conversions next to the channel, not on its own.
  • Use server logs to see assistant fetches that GA4 may miss.

What does a GA4 custom channel group do?#

A channel group sorts traffic into named categories, such as Organic Search, Paid Social or Referrals. GA4 ships with a default group. Google's documentation says you can create your own custom channel groups, which are rule-based categories of your traffic sources, and use them as a dimension in the acquisition reports.

Custom channel groups can also be applied to reports after you create them, so you do not have to wait for a new collection period to see the history. Google describes this as applying them retroactively.

Only an Editor or above at the property level can create or edit channel groups. If you cannot see the Channel groups page, ask the owner of the property for the right role rather than sharing a login.

How do you set up an AI Assistants channel?#

Google's documentation gives a direct method for AI assistants. The steps below follow it, with a note on the one part that needs care.

  1. In GA4 Admin, under Data display, open Channel groups.
  2. Create a new channel group. You can start from a copy of the default group.
  3. Name it clearly, for example AI Assistants or AI Search.
  4. Add a new condition on the source and choose matches regex.
  5. Enter a regex that matches the assistant hostnames you want to count.
  6. Move the new channel above Referrals in the channel list.
  7. Save, then check the acquisition reports with the new group as the dimension.

Google's example regex is broad, and it includes patterns such as ".*ai" that could match unrelated sources. Our read: write a shorter, specific pattern for the assistants you have seen in your own data, and review it.

The table below lists the assistants Google names in its example. The hostnames are a starting point we chose for this guide, not a list from Google. Check them against the sources in your own referral report before you rely on them.

AssistantNamed in Google's exampleStarting hostname to check
ChatGPTYeschatgpt.com
PerplexityYesperplexity.ai
GeminiYesgemini.google.com
Microsoft CopilotYescopilot.microsoft.com
ClaudeYesclaude.ai

A pattern built from that list might read chatgpt.com|perplexity.ai|gemini.google.com|copilot.microsoft.com|claude.ai, but you should confirm the exact text in your own report first.

Which reports should you check?#

Open the acquisition reports, using the Traffic acquisition view, and set your new channel group as the primary or secondary dimension. You should then see the AI channel and its sessions, provided the regex matches the traffic in your data.

Look at three things in order:

  • Sessions and engagement by channel. Is the AI channel growing, flat or shrinking over the last 90 days?
  • Landing pages. Which pages do AI visits land on? If they land on a home page, your deeper guides may not be the pages the assistant found.
  • Conversions. Which of the AI visits signed up, subscribed or made the action you care about?

Our read: the first chart is the least useful. A single line on a chart can be a change in how assistants link to you, a change in your regex or a single campaign. Read it alongside the landing pages and the regex history before you act on it.

What does GA4 miss?#

GA4 measures what a browser reports when it loads a page. That leaves several gaps you should expect.

  • Visits with no referrer. Some apps and some links strip the referrer, so the visit may show as direct traffic.
  • Quoted answers that no one clicks. An assistant may name your product in an answer without sending a visit at all.
  • Visits from a browser that blocks analytics. Ad blockers and privacy settings can stop the GA4 script from running.

Our read: these gaps are normal, and none of them mean the AI channel is worthless. Keep a note of the date and the regex version you used, so you can explain a change later.

How do server logs help?#

Your server or hosting logs record requests whether or not a browser runs analytics. Both OpenAI and Perplexity publish the names of their bots, which makes it possible to find the requests in a log file.

OpenAI describes OAI-SearchBot as the crawler used to surface websites in ChatGPT search, and ChatGPT-User as a user agent used when a person asks ChatGPT a question and it visits a page. Perplexity describes PerplexityBot as the crawler used to surface and link websites in search results, and Perplexity-User as a user agent that may visit a page to help answer a question and link to it.

These names give you a second view. A rise in fetches by a user agent such as ChatGPT-User can show interest that GA4 does not record. It cannot tell you whether a person clicked through, so read it as a signal, not a visit count.

Also check that you have not blocked these bots by accident. OpenAI recommends allowing OAI-SearchBot if you want your site to appear in ChatGPT search results, and Perplexity recommends allowing PerplexityBot in robots.txt for the same reason. Blocking them is a decision for you, but make it on purpose.

What is a simple monthly audit?#

Repeat the same short routine each month so the numbers are comparable.

  1. Export the AI channel's sessions, landing pages and conversions for the month.
  2. Check the regex against the referral sources you saw that month, and add or remove hostnames.
  3. Compare the month with the one before, noting any change to the regex in the note.
  4. Pull the server log entries for the named bots and count fetches by page.
  5. Write three lines: what changed, what you think caused it, and what you will check next month.

Keep the notes in a plain document. The point is to track what you know, not to build a dashboard you will not look at.

What this guide cannot promise#

This setup will show you some AI referrals, but it will not show every answer that mentions your product, and it cannot prove that an assistant chose your page because of any single change. Assistants change how they link and how they summarise sources, and the vendors do not publish a full report of what they cite. Read the numbers as a floor and keep the notes that let you spot a trend.

For the wider work that shapes what an assistant can find, see our guide to how to optimize for AI search answers. For the tools that report AI visibility, see the best AI search visibility tools for startups. For the basics of search on a small budget, see SEO for bootstrapped startups.

Sources#

Disclosure: ZeroRaised publishes this guide and runs a launch site for bootstrapped products. ZeroRaised has no commercial relationship with Google, OpenAI or Perplexity, and no link in this post is an affiliate link. This is general information, not analytics or legal advice for your own site.

Frequently asked questions

How do I see ChatGPT traffic in GA4?

Create a custom channel group in GA4 with a condition that matches the referral sources from ChatGPT, then use the Traffic acquisition report with that channel group as the dimension. Check the hostnames you actually receive, because the list in any guide may be out of date.

Why does GA4 show less AI traffic than I expect?

Visits from some apps and some assistant links arrive without a referrer, so GA4 cannot tell where they came from. Quoted links that people do not click also leave no visit. The channel gives a floor, not a full count.

Can I track AI search traffic without a custom channel group?

You can see referral rows in the default reports, but they are split across the Referrals channel and other rows. A custom channel group puts them in one place and lets you compare them over time.

What do AI crawlers and user agents look like in server logs?

OpenAI and Perplexity publish their bot names. OAI-SearchBot and PerplexityBot are search crawlers, while ChatGPT-User and Perplexity-User appear when an assistant fetches a page for a person who asked a question. Match the names in your logs to the vendor's list.