Banner: How to Measure AI Traffic in Google Analytics 4

How to Measure AI Traffic in Google Analytics 4


Why is it important to measure AI traffic in GA4?

AI platforms like ChatGPT, Gemini, Claude, Microsoft Copilot and DeepSeek are changing how people discover content on the internet. The problem is that Google Analytics 4 doesn’t automatically separate these visits, grouping them into generic categories like “referral” or “organic”, which makes it difficult to understand what’s really happening with this traffic.

Although AI platform traffic still represents a small portion of the total, it has grown rapidly and can be highly valuable. Recent studies show that visitors who arrive through AI assistants often have a clear intention to act, making them valuable traffic that deserves specific tracking.

In this article you will learn how to create a custom channel group for AI traffic, verify it in your reports and analyze it in depth.

Step 1: Create the custom channel group with regex

The first step is to create a specific channel for AI traffic in Google Analytics 4. This will allow you to see traffic from ChatGPT, Gemini, Claude and other AIs alongside your usual channels like “Organic Search” or “Paid Search”.

Open channel group settings

Go to Admin > Data Visualization > Channel Groups in your GA4 property.

Copy the default channel group

Click on the three dots of the “Default channel group” and select Copy. Give it a clear name like “Default + AI Traffic” to identify it easily.

Add the new channel “AI Traffic”

Inside your new channel group, click on Add new channel and configure it like this:

✔️ Channel Name: AI Traffic
✔️ Condition: Source matches regex
✔️ Regex Value: Copy and paste this code

(chatgpt|openai|anthropic|deepseek|grok).com|(gemini|bard).google.com|(perplexity|claude).ai|(copilot.microsoft|edgeservices.bing).com|edge\scopilot

This regex captures the main AI platforms: ChatGPT, OpenAI, Gemini, Claude (Anthropic), Perplexity, Microsoft Copilot, DeepSeek and Grok.

Reorder channels (critical)

This is fundamental. Click on Reorder and move “AI Traffic” above “Referral”. GA4 evaluates the rules from top to bottom, so if Referral is first, it will capture your AI traffic before it reaches the correct channel.

Save

Click on Save and your channel group is ready. GA4 will apply the rules to your historical data automatically.

💡 Tip: The regex is case-sensitive. If you see sources like “ChatGPT.com” (with a capital letter), add the variants you need in the regex.

Step 2: Verify AI Traffic in the Acquisition Report

Now that you have created the channel, let’s verify that it is correctly capturing AI traffic.

Open the Acquisition Report

Go to Reports > Acquisition > Acquisition in your GA4 property.

Change to the Custom Channel Group

By default, the report uses “Default channel group”. Click on the dimension dropdown and select your custom group “Default + AI Traffic”.

Search for your channel “AI Traffic”

If you have received traffic from AI platforms, you will see a row with “AI Traffic” in the table. Review the metrics for sessions, active users, interaction rate and conversions.

Change to Source / Medium to see details

To see which specific platforms are sending traffic, change the dimension to “Source / Medium”. Here you will see rows like:

✔️ chatgpt.com / referral
✔️ perplexity.ai / referral
✔️ copilot.microsoft.com / referral
✔️ gemini.google.com / referral

Add secondary dimension of Destination Page

Click on the + next to the main dimension and add “Destination Page”. This will show you on which specific pages AI visitors land.

💡 Tip: If you see significant AI traffic on specific pages, optimize those pages with clear summaries at the beginning and content structure that facilitates information extraction by AI systems.

Step 3: Analyze AI Traffic in Explorations or Looker Studio

For more in-depth analysis, you can create custom reports in GA4 Explorations or Looker Studio (formerly Data Studio).

Option A: Create Exploration in GA4

Go to Explore and create a new blank report. Add these configurations:

✔️ Dimensions: Session Source, Destination Page
✔️ Metrics: Sessions, Interaction Rate, Key Events
✔️ Filter: Session Source matches regex (use the same regex from Step 1)

This exploration will show you only AI traffic with the metrics that matter most to you.

Option B: Connect to Looker Studio

If you prefer visual dashboards, connect your GA4 property to Looker Studio:

✔️ Create a new report in Looker Studio
✔️ Connect your GA4 data source
✔️ Add a time series chart with your custom channel group
✔️ Add a table with Session Source / Medium filtered by the AI regex

Looker Studio allows you to create shareable dashboards with your team and schedule automatic email reports.

💡 Tip: Save your explorations as templates. When new AI platforms emerge, you only need to update the regex in one place.

What to analyze about AI traffic?

Once the tracking is configured, focus on identifying which pages receive the most traffic from AI tools, as they don’t browse but extract and recommend specific answers, concentrating visits on very specific URLs. Optimize them to be easily “extractable” with clear responses from the start, descriptive headers (H2, H3) and modular content that can be understood out of context.

At the same time, compare the quality of this traffic against other channels by analyzing metrics like the interaction rate, the average interaction time and the key events, keeping in mind that it usually responds to a more resolution-oriented intention than exploratory.

Finally, periodically review your Source / Medium report to detect new AI references and ensure your configuration (including the regex) continues to correctly capture this traffic.

Common mistakes when setting up AI tracking

Not reordering channels correctly
If “Referral” is above “AI Traffic”, all traffic will be assigned to Referral. Always place your AI channel above Referral.

Regex too broad
Avoid generic patterns that capture unrelated sources. The provided regex is specific to known AI platforms.

Ignoring “not set” as medium
If you see AI sources with medium “not set”, investigate how the visit was generated. Some crawlers or AI previews may behave differently.

Not updating the regex regularly
New AI platforms emerge each month. Schedule quarterly reviews of your configuration.

💡 Tip: Create a quarterly reminder in your calendar to review new traffic sources and update the regex if necessary.

The future of AI traffic tracking

The configurations in this article are manual solutions that work today, but the landscape is evolving rapidly. We are already seeing the first moves of the industry towards native AI tracking.

Bing Webmaster Tools, Microsoft’s alternative to Google Search Console, launched in February 2026 a public preview option called “AI Performance” that allows you to see citations of your site in Copilot’s AI responses. Although it is still in the preview phase, it marks the path towards where the industry is heading.

It is reasonable to expect that Google Analytics 4 will integrate native AI traffic tracking in upcoming updates. While those official features arrive, these configurations allow you to start measuring and understanding your AI traffic now, without waiting.

What you can expect in the coming months:

✔️ Native AI Channels in GA4 that automatically group traffic from AI assistants
✔️ Specific Dimensions that identify the exact platform (ChatGPT, Gemini, Claude)
✔️ Integration with Search Console to view citations and AI-driven search traffic
✔️ Specialized Metrics that capture the unique behavior of users arriving via AI

The historical data you collect now will be valuable when you migrate to native solutions, as you will be able to compare trends and behavior patterns from the beginning of the phenomenon.

Conclusion on AI Traffic Tracking

Configuring AI traffic tracking in Google Analytics 4 allows you to understand how AI platforms are sending visitors to your site.

Start with the basic and broad configuration according to your needs. Review the most frequent destination pages, compare the quality of this traffic with other channels and keep your regex updated as new AI platforms emerge.

At Vision by Data, we help companies and independent professionals implement advanced digital analytics strategies in Google Analytics 4. If you need assistance configuring custom tracking or advanced reporting discover how we can help you here.