# GA4 AI traffic: track ChatGPT, Perplexity and Claude visits with a custom channel

> This free tool builds the regular expression and the steps for a custom GA4 channel called AI assistants, so visits from ChatGPT, Perplexity, Claude, Gemini and Copilot show up as their own group instead of being buried in Referral. Pick the sources, test the regex against the sources in your own report, and copy it. It runs in your browser.

Source: https://talkgen.ai/tools/ga4-ai-traffic

Last updated: 2026-11-18

## What does this tool do?

It builds the regular expression that identifies visits from AI assistants, lets you test it against real source names, and gives you the steps to turn it into a custom channel in Google Analytics 4. After that, "AI assistants" becomes its own row next to Organic Search and Direct.

## How do I add the channel in GA4?

Menu names in GA4 change a little over time, so follow the idea if a label differs.

1. Build and copy your regex above.
2. In GA4, open **Admin**, then **Data display**, then **Channel groups**, and choose **Create new channel group**.
3. Give it a name, then choose **Add new channel** and call it `AI assistants`.
4. Set the condition to **Source** (session source), **matches regex**, and paste your regex.
5. **Drag the AI assistants channel above Referral.** The first channel whose rules match wins, so a channel below Referral never gets a visit.
6. Save. Then open **Reports**, **Acquisition**, **Traffic acquisition** and choose your new channel group as the primary dimension.

To look without changing settings, use an Exploration: add a Free form report, put Session source as a row, and add a filter on Session source that matches your regex.

## Which sources count as AI assistants?

| Assistant | Source GA4 commonly shows |
|---|---|
| ChatGPT | chatgpt.com (older: chat.openai.com) |
| Perplexity | perplexity.ai |
| Claude | claude.ai |
| Gemini | gemini.google.com |
| Microsoft Copilot | copilot.microsoft.com |

ChatGPT links often carry a `utm_source=chatgpt.com` parameter, which is why that source appears by name. Less common assistants, such as DeepSeek, Grok, Meta AI, You.com, Poe and Phind, are in the list unticked. Check your own report before relying on any of them.

## What does the regex look like?

For the default sources it is:

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

The `^` and `$` anchor it because GA4 matches the whole value. Dots are escaped so `chatgptXcom` does not match. The test table in the tool shows exactly which of your sources match.

## Why will the number be lower than the real traffic?

Some assistants and apps send no referrer, so those visits land in Direct. Mobile apps often send nothing. What GA4 shows is a floor. Watch the trend week over week rather than the absolute count, and compare it with your Search Console clicks.

## What should I do with the numbers?

Look at which pages AI visitors land on. They tell you which of your pages assistants already cite. We cover how to read them, with data from our own site, in [LLM SEO: what gets cited by ChatGPT](https://talkgen.ai/guides/llm-seo). If the numbers are zero, the first checks are whether AI crawlers can read your site at all, with the [robots.txt checker](/tools/robots-txt-checker), and whether your pages are readable without JavaScript, with the [GEO checker](/tools/geo-checker).

## What comes after measuring?

Measurement shows what is working. TalkGenAI reports Google clicks and the visits AI assistants send, and writes the next articles from that data, saving them to your blog as drafts. You can try it free.

## Frequently asked questions

**How do I track ChatGPT traffic in GA4?**

Visits from ChatGPT arrive with a session source such as chatgpt.com. You can see them in Reports, Acquisition, Traffic acquisition by switching the dimension to Session source / medium. To count all AI assistants together, create a custom channel group with a rule that matches their sources, which is what this tool prepares.

**Why do I need a custom channel group?**

GA4's default channels put most AI assistant visits in Referral, mixed with every other site that links to you. A custom channel gives AI assistants their own row, so you can watch the trend and compare it with organic search.

**Why must the AI channel be above Referral?**

GA4 assigns each session to the first channel in the list whose rules match. If Referral is first, it claims the AI visits before your AI assistants channel can. Drag the new channel above it.

**Why is my AI traffic so low?**

Some assistants and apps strip the referrer, so those visits show as Direct. Mobile apps often send no source at all. What you can measure is a minimum, not the total. Treat the trend as more reliable than the absolute number.

**Does the regex need www or a path?**

No. The regex matches the session source, which is a hostname. It allows an optional www. prefix. GA4 matches the whole value, so the regex is anchored and sources such as notchatgpt.com do not match.

**Are these the right hostnames?**

They are the ones assistants commonly send, but they change over time. Check your own Traffic acquisition report for the sources you actually receive, add any missing ones in the extra hostnames box, and test the result in the table.

**Is anything sent to you?**

No. The tool runs entirely in your browser.
