How to measure and analyze AI traffic in Google Analytics 4

Share this article

In recent months, many websites have started receiving visits from AI tools such as ChatGPT, Perplexity, Gemini, or Copilot. It is not always obvious or easy to identify this kind of traffic in Google Analytics 4, because the platform does not treat it as a separate source and usually mixes it with more traditional channels.

Even so, understanding how this traffic arrives, how it behaves, and how to measure it properly is becoming increasingly relevant. In this article, we’ll look at how GA4 captures traffic coming from AI tools and, more importantly, how we can isolate it, analyse it, and report on it more clearly using the options already available inside the platform itself.

What is AI traffic and how does GA4 capture it?

When we talk about traffic coming from AI tools, we mean visits that arrive on the website from applications or interfaces that use language models, such as ChatGPT, Perplexity, Gemini, or Copilot. From the user’s point of view, the process is simple: the AI shows a link and that link opens in the browser. For GA4, however, there is nothing special about that visit.

Google Analytics 4 does not identify AI traffic as its own category. The platform simply collects the technical information available at the moment the session begins, mainly source, medium, and, if present, the referring domain or referrer. If the AI platform sends a recognizable referrer, that traffic will usually appear as referral traffic. In other cases, it may end up recorded as direct traffic or mixed into other channels that do not really reflect its origin.

This is where one of the main limitations appears. Many AI tools do not send a referrer, do so inconsistently, or use domains that change over time. This means GA4 is only able to capture part of the real traffic generated by these platforms, and any analysis we do will necessarily be based on partial data.

Even so, understanding how this traffic is being recorded is essential. Knowing that GA4 does not distinguish it automatically and instead mixes it with other channels explains why additional configuration is needed if we want to isolate it, analyse it in more detail, and avoid misleading interpretations in reporting.

Why it makes sense to measure and analyze AI traffic

Measuring traffic from AI tools is not really about volume as much as it is about context. On most websites, this traffic still represents a small share of the total, but its origin and intent are usually different from those of more traditional channels. A visit arriving from a search engine is not the same as one landing on the site after an AI has selected a link as the answer to a specific question.

On top of that, this type of traffic often tends to be more qualified in terms of intent. In many cases, the user is not just exploring options in a generic way, but arrives with a fairly well-defined need, which can translate into different behavioural patterns. Analysing metrics such as engagement, landing pages, or conversion separately helps us understand whether this channel behaves more like informational traffic, discovery traffic, or direct-action traffic.

Separating AI traffic also helps avoid misleading readings in other analyses. If this traffic remains mixed into referral, direct, or organic search, it can distort historical comparisons or make certain behavioural changes go unnoticed. Identifying it as its own group makes it easier to put the data in context and start answering more specific questions.

Identifying AI traffic with a segment in GA4

One of the most direct ways to start analysing traffic coming from AI tools in GA4 is to create a segment that groups sessions whose source matches domains known to belong to these platforms. It is not a perfect solution, but it is a very good first step for isolating this traffic and starting to observe its behaviour separately.

The idea is to rely on the session source dimension or the referring domain and apply a regular expression that includes the most common AI providers. Tools such as ChatGPT, Perplexity, Copilot, or Gemini often send an identifiable domain when they open links in a browser, and that is exactly what we can use to build the segment.

This approach works especially well inside the Explorations section, where segments make it possible to analyse metrics and dimensions without affecting the original data.

An example regex that groups the most relevant domains at the moment is this:

chatgpt\.com|chat\.openai\.com|gemini\.google\.com|deepseek\.com|perplexity(?:\.ai)?|claude\.ai|copilot\.microsoft\.com|deepl\.com|character\.ai|(?:\w+\.)?meta\.ai|grok\.x\.com|grok\.com|x\.ai|bard\.google\.com|(?:\w+\.)?mistral\.ai|writesonic\.com

To create the segment, go to Explorations, open or create a new exploration report, and click Segments → + New segment → Session segment. In the Conditions section, select Session source and paste the regex above. This will allow all sessions whose source domain matches any of those providers to be included in the segment.

This pattern makes it possible to identify sessions whose traffic source contains references to AI tools that are currently widely used. Even so, it is worth assuming that this list is not static. New platforms appear, some change domain, and others stop sending referrer information, so it is a good idea to review and adjust the regex periodically in order to avoid both false positives and unnecessary blind spots.

Once applied, this segment becomes the basis for all later analysis. From that point on, it becomes possible to compare the behaviour of AI traffic against other channels, analyse landing pages, or study its impact on conversions, always keeping in mind that we are observing only part of the traffic rather than the full picture.

Creating a custom channel group for AI traffic

If you want this traffic to appear directly in standard reports, the best option is to create a custom channel group. To do that, go to Admin → Data display → Channel groups. Click Create channel group and add a new channel called, for example, AI Assistants.

Inside the channel rules, select the Session source dimension and apply the same regex you used for the segment. That way, any session that matches the condition will automatically be included in this channel. Save the channel group and then go to any acquisition report. You will now be able to filter or compare the AI Assistants channel alongside Organic, Direct, Referral, or others by using the new channel group.

This setup makes it possible to analyse the behaviour of AI traffic consistently across different reports and compare it with other channels without having to apply the segment each time. As with the segment, keep in mind that only visits with an identifiable referrer are captured, so we are always working with partial data, but with data that is much clearer than before.

Using the AI channel group in reports and explorations

Once the channel group for AI traffic has been created, applying it is very simple. In any acquisition report, such as Traffic acquisition or User acquisition, you just need to select the Custom channel group dimension instead of the default one. There, you will see your AI Assistants channel alongside the others, which allows you to compare metrics such as sessions, new users, or engagement against the rest of the channels.

In Explorations, the process is similar. In tables, charts, or any other visualisation in your exploration report, you can use the dimension from your custom channel group to filter or break down the data. This allows you to analyse, for example, which landing pages are most common for AI traffic, how long these users stay on the site, or which events they trigger.

The advantage here is that you do not need to recreate segments again and again, because any session that meets the channel group conditions will automatically appear inside this channel.

With this approach, you can integrate AI traffic directly into your regular reporting and advanced explorations, giving you a much clearer view of its behaviour without having to complicate the analysis with additional filters.

In short, measuring and analysing AI traffic in GA4 requires a bit of extra work because the platform does not distinguish it automatically. Creating a segment based on a regex of AI sources and, above all, defining a custom channel group makes it possible to isolate these visits and analyse them consistently, both in Explorations and in standard reports.

Although the data will always be partial, applying these configurations helps you understand the behaviour of this type of traffic better, compare its performance with other channels, and understand how users arriving from AI tools interact with the website.


Share this article
raul revuelta seo y marketing digital

About me

Raúl Revuelta

Digital marketing consultant specialized in SEO, CRO, and digital analytics. On this blog, I share content about these areas and other topics related to digital marketing, always with a practical, business-focused approach. You can also find me on LinkedIn and X.

Leave a Comment

Your email address will not be published. Required fields are marked *

Would you like to talk about your project?

Scroll to Top