Skip to content

AI search

How to track ChatGPT traffic in GA4, plus the basics to set first

See what AI sends you.

To track ChatGPT traffic in GA4, create a custom channel group with an "AI assistants" channel that matches sources such as chatgpt.com, perplexity.ai, claude.ai, gemini.google.com and copilot.microsoft.com, and place it above Referral. Your AI visits then show as their own line in the acquisition reports, with key events beside them.

It won't catch everything, because some AI visits arrive with no referrer, but it shows the trend. Get the GA4 basics right first: data retention, internal traffic, key events and consent.

Josef Winstone, Founder & Managing Director, Foundry Agency

By Josef WinstoneFounder & Managing Director · 8 min readUpdated

How do you track ChatGPT traffic in GA4?

You give AI assistants their own channel. Out of the box, GA4 files a visit from chatgpt.com under Referral, next to every other site that links to you, so it's easy to miss.

ChatGPT adds a source tag of chatgpt.com to many of the links it shows, and the other assistants pass their own domain as the referrer. A custom channel group catches those sources and reports them together, so you can see how many visits AI sends you, which pages they land on and whether they enquire.

How do you set up an AI channel in GA4, step by step?

It takes about ten minutes. You need Editor access to the GA4 property.

  1. In GA4, go to Admin, then Data display, then Channel groups.
  2. Copy the default channel group, so you keep every standard channel, and name it "Default plus AI".
  3. Add a new channel called "AI assistants".
  4. Set the condition to Source, matches regex, and paste the pattern shown below.
  5. Save, then reorder the channels so AI assistants sits above Referral. GA4 uses the first channel that matches.
  6. Open Reports, then Acquisition, then Traffic acquisition, and switch the channel group to your new one.
  7. Add your key events as a column, so you can see enquiries from AI, not just visits.

Which AI referrers should you include?

Start with the five main assistants, and add others as they show up in your referral report.

  • chatgpt.com: ChatGPT. Older visits may show chat.openai.com.
  • perplexity.ai: Perplexity.
  • claude.ai: Claude.
  • gemini.google.com: Gemini.
  • copilot.microsoft.com: Microsoft Copilot.

What won't GA4 show you?

Three gaps are worth knowing, so you don't read too much into the figures.

  • Visits with no referrer: some assistant apps and copied links arrive as Direct.
  • Google's AI answers: clicks from AI Overviews and AI Mode count as Google organic search. Use Search Console instead.
  • Mentions without clicks: if ChatGPT names you and the buyer calls you, GA4 never knows. Ask new customers how they found you, and track mentions with a fixed set of prompts.

Which GA4 settings should a small business change first?

Four settings, before you trust any report. Most accounts we see have at least one of them wrong.

  • Data retention: GA4 keeps event-level data for two months by default. Change it to 14 months in Admin, under Data collection and modification, so explorations can look back further.
  • Internal traffic: define your office and home IP addresses in the data stream settings, test the filter, then make it active. Active filters permanently exclude data, so test first.
  • Google Ads: link the accounts under Product links, so you can see what people from your ads did on the site.
  • Enhanced measurement: switch it on in the data stream. It records page views, scrolls, outbound clicks, site search, file downloads and some video and form activity without extra work.

Which actions should count as key events?

The ones that make you money. GA4 calls them key events; they used to be called conversions. Without them, your AI channel only tells you about visits.

For a service business that's usually enquiry form submissions, phone clicks, email clicks and bookings. For a shop it's purchases, with add to cart and checkout steps along the way. Track forms when the thank-you message or page appears, not when the button is clicked, because clicks happen even when a form fails. Keep the list short: if a page view is marked as a key event, the figure means nothing.

What goes wrong with GA4 tracking?

Four problems come up again and again. Check for them after any change to your site.

  • Tracking that quietly broke after a redesign, a new form plugin or a cookie banner change. Test key events yourself in DebugView.
  • Duplicate tags, from a plugin and Google Tag Manager at once, which doubles your figures.
  • Consent not wired up. Under UK GDPR and PECR you generally need consent for analytics cookies, and consent mode lets your tags respect the choice.
  • Expecting GA4 to match Google Ads, Meta or your CRM. They count differently. Pick one source of truth per question.

What regex should you use for AI referrers?

Paste this into the Source condition, set to matches regex. It catches the five main assistants and ChatGPT's older domain. Add new sources with another | and the domain.

ga4-ai-channel-regex.txt
.*(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com).*

How does Foundry track AI traffic?

On every SEO and AI SEO account, we check the GA4 basics first: retention, filters, key events and consent. Then we add an AI assistants channel, so visits and enquiries from ChatGPT, Perplexity, Claude, Gemini and Copilot are reported on their own line.

Alongside that, we run a fixed set of buyer questions in the main assistants every month and log who gets named, because most AI influence never shows up as a click. You get both in your report on the 1st of every month.

Our averages. Not our best days.

Our averages

  • 3hours

    Google Ads setup

  • 20mins

    Average reply time

GA4 AI traffic FAQs

  • Usually under Referral, with chatgpt.com as the source. Some visits arrive with no referrer and show as Direct.

  • It reports past data under the new channels, without changing the data itself. The default channel group stays as it was, so you can switch between them.

  • No. Clicks from AI Overviews and AI Mode count as Google organic search. Search Console counts them within your web search figures, without a separate line.

  • Yes. The trend matters more than the size, and AI visitors have often already compared you, so watch the enquiries alongside the visits.

  • In the UK you generally need consent before setting analytics cookies, under UK GDPR and PECR. Connect your cookie banner to GA4 with consent mode.

  • Test your key events monthly, and straight after any change to your site, forms or cookie banner. A sudden drop to zero usually means broken tracking, not lost demand.

  • Not directly, and nobody can guarantee a recommendation. It shows whether your AI SEO work is turning into visits and enquiries, so you know what to do next.

Want to see what AI sends you? Get moving.

Tell us what you need. We'll reply within the hour (working hours), and most websites go live about 5 days after kick-off.

We'll reply within the hour (working hours).

Or email hello@foundryagency.co.uk

Analytics cookies are off until you accept. We use them to see which pages help. Cookie notice