All posts
Web design & development

Tracking AI Referral Traffic in GA4: ChatGPT, Perplexity and Copilot

How to track ChatGPT traffic in GA4: a custom AI channel group for ChatGPT, Perplexity, Copilot, Gemini and Claude, the regex to use and the reports to check.

By Mehdi Hassan7 min read

The short answer

To track ChatGPT traffic in GA4, create a custom channel group with a new AI assistants channel whose session source matches a regex of AI domains such as chatgpt.com, perplexity.ai, copilot.microsoft.com, gemini.google.com and claude.ai. Place it above Referral, save, then switch your acquisition reports to that channel group to see AI visits and key events.

Key takeaways

  • GA4's default channels lump ChatGPT and Perplexity into Referral, so AI visits are easy to miss.
  • A custom channel group with an AI assistants channel fixes that without any code changes.
  • Place the AI channel above Referral, or GA4 will classify the traffic before it gets there.
  • Clicks from Google's AI Overviews and AI Mode show as google organic and can't be split out.
  • AI referrals undercount: app visits and copied links often arrive as Direct.

Part of How to Build an AI-Search-Ready Website: Structure, Schema and Crawlability

Why doesn't GA4 show ChatGPT traffic by default?

GA4 doesn't show ChatGPT traffic as its own channel because its default channel group has no AI category. A visit from a link in ChatGPT usually arrives with chatgpt.com as the source, and GA4 files it under Referral alongside every blog and directory that links to you. Unless someone filters the referral list, AI visits disappear into the noise.

That matters more each year, because buyers increasingly start their research in AI assistants, and visitors from those tools often arrive later in their decision. Measuring them is the last layer of an AI-search-ready website: it tells you whether the rendering, crawler and content work is paying off.

AI tool

Typical session source in GA4

Notes

ChatGPT

chatgpt.com

ChatGPT also adds utm_source=chatgpt.com to many links; older visits may show chat.openai.com

Perplexity

perplexity.ai or www.perplexity.ai

Both forms appear, so match both

Microsoft Copilot

copilot.microsoft.com

Some Copilot clicks arrive via Bing and look like bing organic

Google Gemini

gemini.google.com

The Gemini app, not AI Overviews

Claude

claude.ai

Lower volume for most sites; worth including anyway

Google AI Overviews and AI Mode

google / organic

Not separable in GA4; check Search Console instead

How do you track ChatGPT traffic in GA4?

You track ChatGPT traffic in GA4 by creating a custom channel group that adds an AI assistants channel, defined by a regex on session source. Custom channel groups are a reporting setting, so you don't need to touch your tags or website code, and you need Editor access to the property.

  1. Find your real AI sources first

    Open Reports, then Acquisition, then Traffic acquisition. Change the dimension to Session source and search for chatgpt, perplexity, copilot, gemini and claude. Note the exact source values your property records.

  2. Open channel groups

    Go to Admin, then Data display, then Channel groups, and choose Create new channel group. GA4 starts you with a copy of the default channels.

  3. Add an AI assistants channel

    Choose Add new channel, name it AI assistants, and add the condition Session source matches regex with a pattern such as chatgpt\.com|chat\.openai\.com|perplexity\.ai|www\.perplexity\.ai|copilot\.microsoft\.com|gemini\.google\.com|claude\.ai. Add any other sources you found in step 1.

  4. Move it above Referral

    Channels are evaluated top to bottom, and a session lands in the first one it matches. Use Reorder to place AI assistants above Referral, then save the group.

  5. Switch your reports to the new group

    In Traffic acquisition, click the dimension dropdown and pick your custom channel group. AI assistants now appears as its own row with sessions, engagement and key events.

  6. Save the view for the team

    Customize the report or add it to the Library so the custom channel group is the default view, and add the AI row to your weekly dashboard.

Why a regex on source rather than referrer or UTM

Session source is what GA4 uses for channel grouping, and it's populated from either the referrer or the utm_source parameter. ChatGPT's own utm_source=chatgpt.com tag and its referrer both resolve to the same source value, so one regex catches both.

Using the page referrer dimension instead only works for the first page view and is harder to use in channel groups. Matching on medium doesn't help either, since AI visits arrive as referral or with whatever medium a UTM sets. Keep the regex as a list of exact domains separated by pipes, with the dots escaped, and update it when you see new AI sources in your reports.

Which reports show AI referral traffic best?

Three reports answer the useful questions: Traffic acquisition for volume and engagement by channel, Landing page for which pages AI visitors arrive on, and a key events comparison for whether those visitors convert. Raw session counts from AI are small for most sites, so the quality numbers matter more than the totals.

  • Traffic acquisition with the custom group: sessions, engaged sessions and key events for AI assistants against Organic search and Referral.
  • Landing page filtered to AI assistants: shows which pages engines are citing and sending people to. These pages deserve the most care.
  • Key events by channel: demo requests, signups and contact form submissions from AI visitors. If those aren't tracked yet, fix that first with our guide to GA4 that isn't tracking conversions.
  • An exploration by source: a free-form exploration with Session source and Landing page as rows lets you split ChatGPT from Perplexity.

The landing page view is the one we act on most. If AI visitors keep arriving on a guide or comparison page, that page needs a clear next step for someone who already has the answer. Our guide to designing landing pages for visitors from ChatGPT covers that.

What AI traffic can't GA4 measure?

GA4 can't measure AI influence that doesn't arrive as a click with a referrer. That's a large share of it. Treat your AI assistants channel as a floor, not a total, and pair it with other signals before drawing conclusions.

  • Google AI Overviews and AI Mode: clicks arrive as google organic, indistinguishable from normal search clicks in GA4.
  • Mobile and desktop apps: clicks from some AI apps strip the referrer and land as Direct.
  • Copied links and typed URLs: a buyer who reads about you in ChatGPT and types your domain later shows up as Direct or branded search.
  • Mentions without links: an assistant can recommend you by name with no link at all.
  • Consent: visitors who decline analytics cookies may be modeled or missing, depending on your consent setup. Some teams compare with privacy-friendly analytics tools for a cookieless count.

To fill the gap, add a "How did you hear about us?" field to demo and contact forms with ChatGPT or another AI assistant as an option, watch branded search impressions in Search Console, and test buyer prompts by hand. An AI visibility audit includes a prompt-testing routine you can reuse.

How do you keep AI referral tracking accurate over time?

Review the source list every month or two and update the regex. New assistants launch, existing ones change domains, and products like Copilot route clicks in different ways over time. A five-minute check of the Session source report for unfamiliar AI domains keeps the channel honest.

  1. Monthly: scan Session source for new AI domains and add them to the regex.
  2. After site changes: confirm the GA4 tag still fires on every template, especially after a redesign or platform move. See keeping analytics intact through a migration.
  3. Quarterly: compare AI-channel key events against your form's self-reported source field to see how much AI traffic is hiding in Direct.
  4. When reporting: show AI assistants as its own line next to Organic search, with a note that AI Overviews clicks sit inside Organic.

If you're starting GA4 from scratch, set up the basics first with our GA4 setup guide for marketing websites, then add the AI channel group on top.

Frequently asked questions

Does the custom channel group apply to past data?
Yes. Custom channel groups in GA4 are applied when reports are generated, so once you create one, you can select it for earlier date ranges and see historical AI sessions sorted into the new channel. That makes it easy to see how AI referrals have trended over recent months without waiting for new data to collect.
How many custom channel groups can I create in GA4?
Standard GA4 properties allow only a small number of custom channel groups, while GA4 360 allows more. Check the limit shown in your property's Channel groups screen. Because the allowance is small, it's better to build one well-planned custom group that includes AI assistants and any other channels you need than to create a separate group for each idea.
Is ChatGPT traffic worth tracking if the numbers are tiny?
Yes, because the value is in the pattern, not the volume. Even a small number of AI visitors tells you which pages engines cite and whether those visitors convert. Many startups find AI-referred visitors arrive with a clearer intent, but measure that on your own site rather than assuming it. Small numbers also grow, and early data gives you a baseline.
Can I track AI traffic in Google Tag Manager instead?
You could fire custom events based on the referrer in Google Tag Manager, but it's more work and only catches the first page view. The channel group approach uses data GA4 already collects, needs no tag changes and works on historical data. Use Tag Manager only if you need AI-source information passed into your CRM along with form submissions.

· CEO & Design Director

Copywriter, designer and developer, and founder of Designify Studio. Over five years, 60+ projects across 14+ industries, for startups that have raised $300M+.

Want this done for you? Monthly retainer, $6,000.

Your ongoing design and development team, for products that keep shipping. $6,000, per month, flat fee. Book a free 30-minute call to see if it fits.

Schedule Call