How-To · Measurement

How to Track Traffic From ChatGPT, Perplexity and Other AI Assistants in GA4

A step-by-step setup for an "AI assistants" channel in Google Analytics 4, a copy-ready regex, and an honest look at what the numbers can and can't tell you.

By the Moonlit teamPublished 3 min read

Short answer

In Google Analytics 4, create a custom channel group, add a channel called AI assistants that matches assistant domains like chatgpt.com, perplexity.ai and claude.ai, and move it above Referral. GA4 applies custom channel groups to past data too, so you can see assistant visits right away. Some assistant traffic arrives without a referrer, so treat the number as a floor.

Key Takeaways

  • Create a custom channel group in GA4 with an AI assistants channel.
  • Match assistant domains like chatgpt.com, perplexity.ai and claude.ai, and place the channel above Referral.
  • Custom channel groups apply to past data too.
  • Some assistant visits arrive without a referrer, so treat the number as a floor.

Out of the box, GA4 lumps visits from AI assistants in with every other referral. ChatGPT sits somewhere between a recipe blog and that one directory site from 2014. Not ideal if you want to know whether your AEO work is paying off.

The fix takes about ten minutes and doesn't need any code on your site.

A custom AI assistants channel in Google Analytics 4 Left: the channel order in a custom channel group, with AI assistants moved above Referral so assistant visits are not counted as ordinary referrals. Right: an example traffic acquisition report using made-up numbers, where AI assistants now appears as its own row instead of being mixed into Referral. 1 · CHANNEL ORDER Direct Organic Search AI assistants ✦ Referral Organic Social Order matters: a visit lands in the first channel it matches, so AI assistants has to sit above Referral. 2 · TRAFFIC ACQUISITION EXAMPLE DATA Session custom channel group Sessions Organic Search1,840 Direct960 AI assistants212 Referral184 Organic Social131 Before the custom group, those 212 hid inside Referral.
Move AI assistants above Referral, and assistant visits finally get their own row. The numbers here are made up.

Before You Start

Setting It Up

Create an AI assistants channel
  1. Open channel groupsIn GA4, go to Admin, then Data display, then Channel groups.
  2. Copy the default groupStart from the default channel group so all your usual channels come along. Give it a name like "Channels with AI."
  3. Add a new channelName it "AI assistants."
  4. Add the conditionPick the Source dimension, choose "matches regex," and paste the pattern below.
  5. ReorderDrag AI assistants above Referral. GA4 puts each visit in the first channel it matches, so order matters.
  6. Save and viewOpen the Traffic acquisition report and switch the dimension to your new channel group.

The Pattern

.*(chatgpt\.com|openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com).*

This catches the main assistant domains without grabbing ordinary Google or Bing search traffic. Add domains as new assistants show up in your referral reports.

What the Numbers Tell You

What it shows

  • Visits where an assistant passed along its domain as the referrer
  • Which assistants send traffic, and to which pages
  • Trends over time, especially after you improve a page

What it misses

  • Visits from assistant apps that don't send a referrer, which often land in Direct
  • Times you were cited but nobody clicked
  • Mentions of your brand without a link

That's why it's worth pairing GA4 with two other views:

Make the Data Useful

A number on its own doesn't do much. A few ways to put it to work:

Frequently Asked Questions

Why is my AI assistants channel empty?

Either you aren't getting assistant traffic yet, or those visits arrive without a referrer. Check the Referral channel for assistant domains first. If they're there, your regex or channel order needs a tweak.

Does this slow down my site?

No. Channel groups are just a reporting setting inside GA4. Nothing changes on your website.

Can I see which questions people asked?

Not in GA4. Bing Webmaster Tools shows a sample of the grounding queries Copilot used to find your cited pages. Other assistants don't share this yet.

Sources