Skip to content
How-to guide

How to Track ChatGPT and Perplexity Traffic in GA4

The short answer

To track ChatGPT and Perplexity traffic in GA4, build a custom channel group called AI assistants. Add a channel that matches Session source against a regex of assistant domains such as chatgpt.com and perplexity.ai, then move it above Referral. Expect a floor, not a total: some AI visits arrive with no referrer and show as Direct.

  • GA4 now has a default AI Assistant channel, but it excludes Google AI Overviews and AI Mode, and you cannot edit its rules.
  • A custom channel group with a tested, anchored regex on Session source gives you a list you control and can audit.
  • Some AI visits arrive with no referrer and land in Direct. Treat GA4 counts as a floor, not a total.
  • Test with a real click, then confirm in Traffic acquisition the next day.
  • Add an AI option to your “How did you hear about us?” question to catch the visits GA4 cannot see.

What can GA4 tell you about AI traffic, and what can't it?

GA4 can count visits that arrive by clicking a link in a chat assistant, as long as the assistant passes its name along. It cannot split Google AI Overviews and AI Mode from ordinary Google results. Google's own channel rules put both inside Organic Search, outside the AI Assistant channel 1.

Three kinds of visit matter. A referral visit shows the chat app as its source. A direct visit has no source at all. A search visit comes from Google. Ahrefs says a permanent chunk of AI visits will land in direct traffic, where you cannot recognize them 8. Plan for that gap from day one.

So treat GA4 as a floor, not a total. It gives you a trend you can trust more than a number you can quote. Read what AI referral traffic is for the wider picture.

Do it step by step

0 of 10 done0%

  1. Open Reports, then Acquisition, then Traffic acquisition. Set the date range to the last 90 days and look for an AI Assistant row in the default channel group 1. Write down the session count so you have a before figure.

    Tip: If the row exists, keep it. Your custom group will sit beside it, not replace it.

  2. Change the table's primary dimension to Session source / medium 5. Use the search box to look for chatgpt, perplexity, claude, gemini, copilot and openai. Write down each spelling you find, including any that carry tags.

    Tip: Export the full source list to a spreadsheet. You will need it for the regex test in step 3.

  3. Use the bash tester in the templates with your exported sources. Every AI source should appear under Matches, and nothing else should. Add any missing spellings to the pattern and run it again.

    Tip: Test on real data. A pattern that works on five examples can still catch an ordinary site.

  4. Go to Admin, then Data display, then Channel groups, and choose Create new channel group. This copies the default group. Add a channel named AI assistants (custom) with the condition Source matches regex, then paste your tested pattern 2. Save the channel and the group.

    Tip: You need the Editor role, and standard properties allow only 2 custom groups 2.

  5. Traffic goes to the first channel it matches, so order matters. Use Reorder to drag your AI channel above Referral and, if gemini.google.com visits land in Organic Search, above that too, then click Apply 2. Google's own AI assistants example gives the same ordering advice.

    Tip: Re-check Traffic acquisition after reordering. A wrong order can leave the channel empty.

  6. In Traffic acquisition, switch the primary dimension to your custom group. Google says custom groups apply to reports retroactively, so history fills in 2. Add Landing page as a second dimension to see which pages AI visitors reach first.

    Tip: Audiences work differently. Changes to audiences apply from now on only 2.

  7. Add your key events, which are the actions you mark as important such as a form submission. Compare engagement and key events for the AI channel with Organic Search. Keep the sample size in view: with a few dozen visits, one enquiry changes the rate a lot.

  8. Ask an assistant a question your page answers. If it cites you, click through. If it does not, paste your URL into the chat and click that. Then check Realtime and, the next day, Traffic acquisition 4. Note exactly where the visit landed.

    Tip: A pasted-link test checks the referrer, not whether the assistant would cite you.

  9. Add “ChatGPT or another AI tool” to your “How did you hear about us?” list and allow more than one answer. Ahrefs recommends this because attribution tools miss part of the AI channel 8. Use the options in the templates.

    Tip: Ask a follow-up in sales calls: which question did you ask the AI?

  10. Once a month, scan your Session source list for new assistants and update the regex 2. Record the AI channel's sessions, key events and the self-reported count in the log from the templates. Compare month to month, not against other companies.

Your ticks are saved in this browser only.

Copy-ready templates

GA4 regex: core five assistants

regex
^(www\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com)$

Paste into a channel with the condition Source matches regex. Tested against sample sources: it matches the six domains above, with or without www, and rejects names such as mychatgpt.com, openai.com and bing.

GA4 regex: extended list of AI assistants

regex
^(www\.)?(chatgpt\.com|chat\.openai\.com|labs\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|chat\.deepseek\.com|grok\.com|duck\.ai|chat\.mistral\.ai|meta\.ai|notebooklm\.google\.com|you\.com)$

Built from 15 domains in Matomo's open-source list of AI assistants. We left out other entries, such as iask.ai and chatglm.cn. Remove you.com, labs.openai.com and bard.google.com if you do not want them in the channel, and test against your own source list.

Bash: test the regex on your exported sources

bash
#!/usr/bin/env bash
# Replace the list below with your own GA4 Session source values, one per line.
cat > sources.txt <<'LIST'
chatgpt.com
perplexity.ai
www.perplexity.ai
gemini.google.com
google
bing
openai.com
mychatgpt.com
claude.ai
(direct)
LIST

RE='^(www\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com)$'

echo "== Matches (would go in the AI channel) =="
grep -E "$RE" sources.txt
echo "== Does not match =="
grep -v -E "$RE" sources.txt

Run with bash. With the sample list, five sources match and five do not. Swap in the extended pattern if you use it. This tests the pattern logic only; GA4 itself has the final say, so also check the channel in Traffic acquisition.

Self-reported attribution options for your form

text
How did you first hear about us? (select all that apply)
[ ] Google search
[ ] ChatGPT, Perplexity, Claude, Gemini or another AI tool
[ ] Social media (which one?)
[ ] A friend, colleague or referral
[ ] An event or talk
[ ] Other: ______

If you chose an AI tool, what did you ask it? (optional)
______________________________

Keep the AI option as its own line so it is easy to count. The optional follow-up gives you real buyer prompts to build pages around.

Monthly AI traffic check log

markdown
| Month | AI channel sessions | Key events from AI channel | Self-reported AI answers | New sources found | Regex updated? | Notes |
|---|---|---|---|---|---|---|
| 2026-11 | | | | | | |
| 2026-12 | | | | | | |

Also record: Search Console Generative AI report impressions (for Google AI surfaces), and the date of your last test visit.

GA4 counts are a floor. Read the three columns together, and look at direction over several months rather than any single month.

What do you need, and how long does it take?

You need the Editor role on your GA4 property, which Google requires to create channel groups 2. The setup takes about 30 minutes. A monthly review takes about 15 minutes. Both times are our estimates, not measured figures.

  • A GA4 property that has been collecting data for a few weeks.
  • A terminal with grep, or any regex tester, to check your pattern before you save it.
  • Your enquiry form or booking flow, so you can add one extra question.

Why track a channel that is still small?

Because you cannot manage what you cannot see. Vendor data from 2025 suggests AI referral traffic was growing from a tiny base. Conductor's benchmark across 10 industries found AI referral traffic was 1.08% of website traffic, about 1 visit in 100. Industries ranged from 0.25% to 2.80% 9. On average, 87.4% of that AI traffic came from ChatGPT 9. The data covers May to September 2025 in the US, so your numbers will differ.

Growth is the other reason. Microsoft Clarity found AI platform traffic to over 1,200 publisher and news sites grew 155.6% in eight months, against 24.0% for search, while staying under 1% of traffic 10. That is growth from a tiny base, so do not read it as a forecast.

Quality is disputed. The same Clarity post reported that visitors from AI assistants signed up at 1.66%, against 0.15% for search, over one month 10. Clarity's own subscription rates were about 2.4 times those of search, so the sign-up gap overstates the case. It is a vendor post about its own customers. Use it as a reason to measure your own conversions, not as a benchmark.

Does GA4 already have an AI channel?

Yes. GA4's default channel group has an AI Assistant channel for visits from sources such as ChatGPT, Gemini, Deepseek, Copilot and Grok. It excludes Google's AI Overviews and AI Mode 1. Check your own property first, because it may already do half the job.

There are two reasons to build your own anyway. Google links a spreadsheet of the sources it matches, but you cannot edit the default definitions, and they may change as the market does 1. A custom group gives you a list you can read, change and keep stable.

Custom groups have limits. Standard properties get 2 custom channel groups and 360 properties get 5 2. Custom groups are also not in the BigQuery export schema 2, so any SQL needs its own matching rule.

What does a ChatGPT or Perplexity visit look like in GA4?

Expect the source to be the assistant's web address. Semrush's current guide tells you to filter Session source for chatgpt.com in the Traffic acquisition report 5. Matomo's open-source list of AI assistants supplies the other addresses in the table 6. Both are analytics vendors' lists, not official statements from the assistants. We found no first-party statement from Perplexity that it passes perplexity.ai as the referrer, so confirm in your own source list.

The search we recorded also included the tag utm_source=chatgpt.com. We could not confirm from OpenAI that ChatGPT adds it. OpenAI's help pages returned an error when we tried to read them, and its API search guide does not mention it. What we can document is how GA4 treats tags. Google says missing UTM parameters produce (not set) values 3. A visit with a source but no medium is therefore likely to land in Unassigned, the label GA4 gives traffic that matches no channel 1. That is why the regex below matches on source alone.

AI assistants and the Session source names to look for
AssistantSource to look forWhere the name comes from
ChatGPTchatgpt.com (also chat.openai.com)Semrush's GA4 filter and Matomo's list 56
Perplexityperplexity.aiMatomo's list 6
Claudeclaude.aiMatomo's list 6
Gemini appgemini.google.comMatomo's list 6
Microsoft Copilotcopilot.microsoft.comMatomo's list 6
Google AI Overviews and AI ModeCounted as Organic Search, not a separate sourceGA4 default channel rules 1

What did an AI assistant search for when we asked this question?

On 20 October 2026 a Claude agent with web search ran three searches for “how to track ChatGPT and Perplexity traffic in Google Analytics 4”: finding the traffic, grouping it with a regex, and understanding tags and referrers.

This page answers all three, but it was one run on one engine, so read it as a sample, not a rule.

How does the regex work, and how do you keep it safe?

The regex is a list of exact source names wrapped in anchors. A regex, short for regular expression, is a pattern that matches text. Each dot is written as \. so it means a literal dot. The ^ and $ marks pin the pattern to the whole source name. That keeps names such as mychatgpt.com and chatgpt.com.example.net out.

Google's custom channel page shows its own AI assistants example, which uses a matches regex condition on the source. It tells you to update the regex when assistant URLs or your list change 2. Test any pattern, including ours and Google's, against your real source list before you save it. A pattern that is too broad pulls ordinary sites into the AI channel and inflates the count.

Hand-tagged links can also trip you up. UTM values are case sensitive, so ChatGPT and chatgpt would be counted as different sources 3. Look through your source list for odd spellings and add them to the pattern.

Where does the count go wrong?

Most errors come from six causes. Check the table when a number looks too low, too high or missing.

Common counting problems and what to do
What you seeLikely causeWhat to do
AI visits appear as DirectThe link carried no referrer. Browsers send referrer details according to a referrer policy, and some policies send none 7. Ahrefs says plenty of AI platforms strip referrer data 8.Accept a floor. Add the self-reported question below.
AI visits appear as UnassignedA tag with a source but no medium produces (not set) values 3.Match on Session source only, as the regex here does.
Google AI Overviews and AI Mode are missing from the AI channelGA4 files them under Organic Search 1. Clarity says they share the google.com referrer with normal search 11.Use the Search Console report instead 12.
Totals jump after you add the regexThe pattern is too broad and catches ordinary sites.Anchor it with ^ and $ and test it on your source list.
The same assistant appears on two rowsDifferent spellings, or case differences in tagged links 3.Add both spellings to the pattern.
A new assistant sends visits but is not countedThe list is out of date. Google says to update it as assistants change 2.Review your Session source list once a month.

How do you check that the setup worked?

Test with a real click, then check twice. Click a link to your site from inside an assistant and open Realtime in GA4. Realtime data usually arrives within minutes but covers fewer features 4. The next day, look in Traffic acquisition. Google says daily data for standard properties is typically ready in about 12 hours, and that processing can take 24 to 48 hours 4.

Your setup works when the test visit lands in your custom channel, the channel total roughly matches a manual filter on Session source, and nothing odd sits inside it. If the test visit shows as Direct, that is a finding too. It does not mean your regex failed. It shows that this path passes no referrer.

When is a custom channel group not worth it?

Skip it if the default AI Assistant channel already shows what you need, or if your site gets so few visits that a monthly trend means nothing. With only a handful of AI visits a month, a self-reported question on your enquiry form tells you more 8.

Using a different analytics tool does not change the logic. Matomo keeps its own AI assistant list 6, and Clarity has its own AI platform channel 11. For measuring what you earn from this channel, try the ROI Calculator and read how to set up self-reported attribution.

What an AI assistant searches when it answers this

We gave the question below to AI search tools and recorded the web searches they ran behind the scenes. This is called query fan-out. Each phrase is a page you could publish to be found and cited.

The prompt

“how to track ChatGPT and Perplexity traffic in Google Analytics 4”

The searches it ran
  • track ChatGPT traffic in GA4
  • GA4 custom channel group AI referrals regex
  • Perplexity referral traffic GA4 utm_source chatgpt.com

Observed October 20, 2026 using Claude web search. Claude agents were told to run 6 to 10 searches, so that count is our setting, not Claude's own choice. Assistants differ and change often, so treat this as a sample, not a rule. See how we collect it.

Frequently asked questions

Does GA4 track ChatGPT traffic automatically?

Partly. GA4's default channel group has an AI Assistant channel for visits from sources such as ChatGPT, Gemini, Deepseek, Copilot and Grok 1. Google's source list is a downloadable spreadsheet you cannot edit, and visits without a referrer fall into Direct. A custom channel group gives you a list you can audit.

Why does some ChatGPT traffic show up as Direct?

The visit arrived without a referrer, so GA4 had no source to read. Browsers send referrer details according to a referrer policy, and some settings send none 7. Ahrefs also says plenty of AI platforms strip referrer data 8. Self-reported attribution is the practical fix.

Can GA4 separate Google AI Mode from normal organic traffic?

No. Google's default channel rules count AI Overviews and AI Mode inside Organic Search 1. Use the Search Console Generative AI performance report to see impressions from those features 12. Read how to optimize for Google AI Mode for what each report can show.

Do I need UTM tags to track AI traffic?

Not for links the assistants create, because you cannot add tags to those. Use tags only on links you control, and always include source, medium and campaign 3. Keep values lowercase, because Google says UTM values are case sensitive 3. Never tag links between your own pages.

How much of my traffic should come from AI assistants?

Probably little today. Conductor's benchmark across 10 industries found AI referrals were 1.08% of traffic on average, ranging from 0.25% to 2.80% by industry 9. That data is from 2025 and from large US sites. Judge your own trend over several months instead.

Will a custom channel group change my past data?

Reports can show history through it, because Google says custom channel groups can be applied to reports retroactively 2. Audiences are different: changes apply going forward only. Custom groups are also missing from the BigQuery export, so SQL users must apply the same regex themselves 2.

About the author

Rahil Jain

Rahil Jain is an AI SEO (answer engine and generative engine optimisation) consultant and co-founder of Chalk Labs.

LinkedIn · Method and credentials

Sources

  1. [GA4] Default channel group · Google Analytics HelpOpened October 20, 2026. Supports: The AI Assistant channel (ChatGPT, Gemini, Deepseek, Copilot, Grok) excludes Google's AI Overviews and AI Mode; Organic Search includes them; Google links a downloadable spreadsheet of default sources; default definitions cannot be edited and may evolve; unmatched traffic is labelled Unassigned; Direct definition.
  2. [GA4] Custom channel groups · Google Analytics HelpOpened October 20, 2026. Supports: Editor role and the Admin, Data display, Channel groups path; matches regex condition; first-match ordering; 2 custom groups for standard properties and 5 for 360; retroactive application to reports; audiences apply going forward only; not in the BigQuery export schema; the AI assistants example, reorder above Referrals, and update the regex when URLs change.
  3. URL builders: Collect campaign data with custom URLs · Google Analytics HelpOpened October 20, 2026. Supports: Always use utm_source, utm_medium and utm_campaign; missing UTM parameters produce (not set) values; parameter values are case sensitive.
  4. [GA4] Data freshness · Google Analytics HelpOpened October 20, 2026. Supports: Realtime data arrives within minutes with fewer features; daily data for standard properties is typically ready in about 12 hours; processing can take 24 to 48 hours.
  5. How to track ChatGPT traffic for you and for competitors · SemrushOpened October 20, 2026. Supports: Open Traffic acquisition, switch to Session source / medium and filter Session source for chatgpt.com; AI platforms do not always pass referrer information, so some traffic may appear as direct (published 6 May 2026).
  6. AIAssistants.yml (searchengine-and-social-list) · Matomo (GitHub)Opened October 20, 2026. Supports: An analytics vendor's maintained list of 19 AI assistants and their domains, including chatgpt.com, chat.openai.com, perplexity.ai, claude.ai, gemini.google.com and copilot.microsoft.com. Not an official statement from the assistants.
  7. Referrer-Policy header · MDN Web Docs (Mozilla)Opened October 20, 2026. Supports: The Referrer-Policy header controls how much referrer information is sent; some policies send none; the browser default is strict-origin-when-cross-origin; the noreferrer link relation omits the referrer.
  8. How to Measure AI Search Visibility When Attribution Falls Short · Ahrefs BlogOpened October 20, 2026. Supports: Plenty of AI platforms strip referrer data; a permanent chunk of AI visits lands in direct traffic; recommends adding AI tool options to a How did you hear about us question (published 6 October 2026).
  9. AEO / GEO Benchmarks Report · ConductorOpened October 20, 2026. Supports: AI referral traffic was 1.08% of website traffic across 10 industries (0.25% to 2.80% by industry); 87.4% of it came from ChatGPT on average; AI traffic data covers May to September 2025 in the US, across 1,215 enterprise customer domains; page last updated 6 July 2026.
  10. AI Traffic Converts at 3x the Rate of Other Channels (Study) · Microsoft ClarityOpened October 20, 2026. Supports: Over 1,200 publisher and news sites: AI platform traffic grew 155.6% in eight months against 24.0% for search, and stayed under 1% of traffic; one-month sign-up rates of 1.66% for LLM referrals against 0.15% for search; vendor study (published 6 November 2025).
  11. Frequently asked questions (Microsoft Clarity) · Microsoft LearnOpened October 20, 2026. Supports: Traffic from AI-enhanced search features such as Google's AI Overview cannot be reliably separated from standard search because they share the google.com referrer; Clarity's AI platform channel covers direct AI chat platforms.
  12. Generative AI performance report (Search) · Google Search Console HelpOpened October 20, 2026. Supports: The report shows impressions from AI Overviews and AI Mode by page, country, date and device; rolled out to all websites worldwide as of 31 August 2026.
How this page was made. Built on Rahil Jain's AI SEO method and drafted with AI research assistance. Every statistic links to the page we read it on (opened October 20, 2026 or nearby). Published October 20, 2026; last updated October 20, 2026. Chalk Labs sells AI SEO services, so we have a commercial interest in this topic. Spotted an error? Tell us and we will fix it.