AI Visibility Prompt Generator
What are your buyers asking AI? Generate the prompts to test in ChatGPT, Perplexity and Gemini, with a free sheet to track whether AI mentions you.
Free tool · GA4 AI Traffic Regex Generator
Generate a precise regex for Google Analytics 4 that groups visits from ChatGPT, Perplexity, Gemini, Claude, Copilot and other AI assistants into their own channel. Test it against your own traffic sources, then follow the step-by-step setup.
The generator
The regex is anchored to whole domain names, so “you.com” never catches “youtube.com”, unlike the loose patterns often shared online.
These steps follow Google's own guidance on custom channel groups. You need Editor access or above.
In GA4, go to Admin, then under Data display click Channel groups.
Click Create new channel group. It starts as a copy of the default group. Name it something like “Channels with AI”.
Click Add new channel and name it “AI assistants”.
Choose Source, then matches regex, and paste: ^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|bard\.google\.com|claude\.ai|copilot\.microsoft\.com|chat\.deepseek\.com|grok\.com|meta\.ai|chat\.mistral\.ai)$
Save the channel, click Reorder and drag “AI assistants” above Referral. GA4 puts each visit in the first channel it matches. If the group also contains GA4's built-in AI Assistant channel, place yours above that too, so AI traffic isn't split across two rows.
Click Save group. Then open Reports, Acquisition, Traffic acquisition and switch the primary dimension to your new channel group.
We'll configure AI traffic tracking in your GA4 property, check what's being misattributed, and reply personally with what your AI traffic is telling you. Free, with no obligation.
The guide
Create a custom channel group with a channel called “AI assistants”, set its condition to Source matches regex, paste a regex listing the AI platforms' domains, and move the channel above Referral. GA4 then reports AI visits as their own channel in the Traffic acquisition report.
GA4 also has a built-in AI Assistant channel. A custom channel is still worth setting up, because it lets you decide exactly which platforms count and see each one clearly.
Yes. According to Google's channel definitions, the default channel group now includes an AI Assistant channel for visits “from sources like ChatGPT, Gemini, Deepseek, Copilot, or Grok”. GA4 sets the medium to “ai-assistant” when the referrer matches its list.
Two limits are worth knowing:
A custom channel group built from the regex above puts you in control of the definition, and you can use both side by side.
GA4 can only attribute a visit to ChatGPT if it receives a referrer or a campaign tag. Some AI traffic arrives with neither:
utm_source=chatgpt.com to links it cites, which GA4 reads as the source, but not every link carries it.That means any AI channel undercounts. Treat it as a reliable minimum, and watch for unexplained rises in Direct traffic to pages that AI tools tend to cite.
Not separately. Clicks from AI Overviews and AI Mode arrive as ordinary Google organic traffic. According to Google's documentation, they're included in Search Console's Performance report within the “Web” search type, but there's no filter to separate them from regular results.
| Platform | Company | Source domains |
|---|---|---|
| ChatGPT | OpenAI | chatgpt.com, chat.openai.com |
| Perplexity | Perplexity | perplexity.ai |
| Gemini | gemini.google.com, bard.google.com | |
| Claude | Anthropic | claude.ai |
| Microsoft Copilot | Microsoft | copilot.microsoft.com |
| DeepSeek | DeepSeek | chat.deepseek.com |
| Grok | xAI | grok.com |
| Meta AI | Meta | meta.ai |
| Le Chat | Mistral AI | chat.mistral.ai |
| You.com | You.com | you.com |
bard.google.com is Gemini's former address, kept so older links still count. AI platforms change domains from time to time, so check the Source column of your Traffic acquisition report every few months and add anything new using the field above.
Google Analytics regex is full-match and case-sensitive by default, which trips up a lot of copied patterns. The generated regex is built for that:
^ and $ make it match the whole source, so a lookalike domain doesn't slip through.(.*\.)? allows any subdomain, such as www.perplexity.ai.\., so they match a literal dot rather than any character.Use the first version wherever GA4 asks for “matches regex”, such as channel group conditions. Use the second where it offers “partially matches regex”, such as some report filters.
Yes. GA4's default channel group now includes an AI Assistant channel, which Google describes as covering sources like ChatGPT, Gemini, DeepSeek, Copilot and Grok. Google doesn't publish its full list of sources, and the channel excludes Google's own AI Overviews and AI Mode. A custom channel group lets you decide exactly which platforms count.
Yes. Google says custom channel groups can be applied to your reports retroactively, so once you've created the group you can look back at past AI traffic, not just new visits.
Standard GA4 properties can have 2 custom channel groups in addition to the default group, each with up to 50 channels. GA4 360 properties can have 5.
The most common cause is channel order. GA4 puts each visit in the first channel it matches, so if your AI channel sits below Referral, AI visits are counted as Referral. Drag it above Referral. Also check the regex was pasted exactly, because GA4 regex is full-match and case-sensitive.
Yes. Google Analytics regex is case-sensitive and full-match by default. Traffic sources are normally lowercase, which is why the generated regex uses lowercase domains.
No. GA4 measures visits from people's browsers. AI crawlers fetch your pages without running analytics code, so they don't appear in GA4. To see crawler activity, check your server logs or your host's bot reports.
No. The regex is built and tested in your browser, and nothing you enter is sent or saved.
Keep going
What are your buyers asking AI? Generate the prompts to test in ChatGPT, Perplexity and Gemini, with a free sheet to track whether AI mentions you.
Decide which AI bots can read your site. Build robots.txt rules for 18 verified AI crawlers, check your current file and create an llms.txt.
Is your website AI-friendly? Fifteen questions show how likely ChatGPT, Perplexity, Gemini and Google AI Overviews are to recommend your brand, with a prioritised fix list.