AI Traffic Tracker for GA4
See the visits ChatGPT, Perplexity, Claude, Gemini and other AI assistants send you. Pick the assistants, copy one regex, and follow Google's own steps to give them their own channel in GA4, an Exploration filter and a Looker Studio field.
From the Apex (AEO program) toolset.
02 Your regex for Session source
^(www\.)?(chatgpt\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|copilot\.com|copilot\.cloud\.microsoft|chat\.deepseek\.com|grok\.com|meta\.ai|chat\.mistral\.ai)$
Every dot is escaped, and the ^ and $ anchors make it match whole values only. GA4 reads regex as a full match by default, so the anchors change nothing there and keep the regex safe in tools that read it as a partial match.
Paste a value to test it.
03 Give AI assistants their own channel in GA4
These steps follow Google's guide to custom channel groups. You need the Editor role or above on the property.
Open Channel groups
In Admin, under Data display, click Channel groups.
Create a group
Click Create new channel group. It starts as a copy of the default group. Give it a name, such as
Channels with AI assistants.Add the channel
Click Add new channel and name it
AI assistants.Set the condition
Click Add condition group, pick the Source dimension, choose matches regex and paste your regex. Then click Save channel.
Move it up
Click Reorder and drag AI assistants above Referral, then click Apply. Traffic goes into the first channel it matches, and Google's guide asks for this order. If the group also lists GA4's own AI Assistant channel, place yours above that too, so your list decides.
Save and report
Click Save group. Open Acquisition > Traffic acquisition and pick your new group as the primary dimension. Custom channel groups also apply to your past data.
Standard GA4 properties can have 2 custom channel groups, with up to 50 channels in each.
04 Filter an Exploration
Add the filter
Open an exploration. At the bottom of the Settings panel, in the Filters section, click Drop or select dimension or metric and choose Session source.
Paste the regex
Pick a regex match type, paste the same regex and click Apply. Exploration filters are case sensitive.
Source: Google's guide to segments and filters in explorations.
05 Use it in Looker Studio
Add a calculated field with this formula to your GA4 data source, then use it as a dimension or filter on any chart.
CASE WHEN REGEXP_MATCH(Session source, R"^(www\.)?(chatgpt\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|copilot\.com|copilot\.cloud\.microsoft|chat\.deepseek\.com|grok\.com|meta\.ai|chat\.mistral\.ai)$") THEN "AI assistants" ELSE "Other sources" END
REGEXP_MATCH is true when the whole value matches the pattern. The R before the quotes is Looker Studio's raw string prefix, so the backslashes stay exactly as typed. See Google's guide to regular expressions in Looker Studio.
GA4's default channel group now includes an AI Assistant channel for sources like ChatGPT, Gemini, DeepSeek, Copilot or Grok, based on a list Google keeps (Google's guide). A custom channel lets you decide which assistants count, and the same regex works in explorations and Looker Studio.
It counts only the visits that arrive with an assistant's address as their source. Check the Session source values in your own Traffic acquisition report and test any you are unsure of above.
How it works
One address per assistant
Each assistant you tick adds the web address it runs on, as listed on the vendor's own site. When a visit arrives from that address, GA4 can record it as the session source.
One regex for every tool
The addresses are joined into one regular expression with the dots escaped and both ends anchored. The same pattern works in a GA4 channel, an Exploration filter and Looker Studio.
Nothing leaves your browser
The regex is built on this page. Test any source value from your own reports before you save the channel.
