How To Track AI Traffic In Google Analytics 4
Strategy 8 min read

How To Track AI Traffic In Google Analytics 4

Learn how to track AI traffic in Google Analytics 4 using a custom Exploration report, including ChatGPT, Perplexity, Copilot, Claude, Gemini and other AI referral sources.

Table of Contents

Summary

AI platforms are becoming part of the search journey. People use tools such as ChatGPT, Perplexity, Copilot, Gemini and Claude to research services, compare suppliers, find answers and make decisions before they ever reach a website.

Some of that traffic can be tracked in Google Analytics 4 by creating a custom Exploration report. The method uses the Session source / medium dimension, the Page path + query string dimension, and a regex filter that looks for known AI platforms in the session source.

This guide explains how to build the report, what the data means, and how to use it to improve content for AI-assisted search journeys.

Why AI Traffic Matters

Standard website reporting usually focuses on organic search, paid search, direct traffic, social media, email and referral traffic. That is still useful, but it does not always show how people are finding businesses through AI-assisted research.

AI tools are increasingly used to answer commercial questions such as:

  • Who provides this service near me?
  • Which company is best for this type of project?
  • What should I look for before choosing a supplier?
  • How much does this type of service usually cost?
  • What are the differences between two products, platforms or providers?

If your website is being surfaced during these research journeys, that traffic has value. It may show that your content is being referenced, recommended or discovered through AI tools.

The purpose of tracking AI traffic is not just to count visits. The real value is identifying which pages are already being found, which topics are gaining visibility, and where new content can be created to answer the questions people are asking AI platforms.

What This Report Shows

This Google Analytics 4 report helps you identify sessions where the source or medium appears to match known AI tools and AI-related referral sources.

The report can help you see:

  • Which AI platforms are sending traffic to your website
  • Which pages are receiving visits from AI sources
  • Which pages are acting as entry points from AI platforms
  • Which topics may already be useful to AI-assisted search journeys
  • Which pages could be expanded, improved or supported with new content

This is useful for SEO, content planning, conversion optimisation and AI search visibility. It gives you a practical way to review how your existing content is performing outside traditional search reports.

How To Create The Report In Google Analytics 4

To build the report, open Google Analytics 4 and go to Explore. Start a new Free-form Exploration.

Google Analytics 4 Explorations allow you to create custom reports using your own dimensions, metrics, rows, columns and filters. You can also use nested rows to group the data in a clearer way.

SettingWhat to useWhy it matters
Exploration typeFree-form ExplorationGives you a flexible table for reviewing traffic sources and page-level performance.
DimensionsSession source / mediumShows where the session came from.
DimensionsPage path + query stringShows the page URL path and any query string attached to it.
MetricsViewsShows how many page or screen views were recorded.
MetricsEntrancesShows how often the page was the first page viewed in a session.
RowsSession source / medium, Page path + query stringGroups AI source data with the pages visited.
Rows shown250 rowsGives you a wider view of AI traffic patterns.
Nested rowsYesMakes it easier to see which pages sit under each source.
ValuesEntrances, ViewsShows both entry-page activity and total page views from the filtered sources.

For Google’s own guidance on Explorations, dimensions and page path reporting, see the following resources:

AI Source Filter Regex

Once the report structure is in place, add a filter using Session source / medium.

Set the filter to matches regex, then add the following expression:

.*chatgpt.*|.*openai.*|.*neeva.*|.*writesonic.*|.*nimble.*|.*outrider.*|.*perplexity.*|.*edgeservices.*|.*gemini.*google.*|.*copilot.*|.*claude.*|.*mistral.*|.*meta.*|.*jasper.*|.*deepmind.*|.*copy.*ai.*

This filter looks for sessions where the source or medium contains terms linked to known AI tools, AI search platforms or AI-related referral sources.

You can expand this regex over time as new AI tools appear in your analytics data. The report should be treated as a working view rather than a fixed, complete list of every possible AI source.

How To Read The Report

Once the filter is applied, the Exploration should show AI-related traffic sources alongside the pages they visited.

The most useful parts of the report are:

  • Session source / medium: shows the AI platform or referral source.
  • Page path + query string: shows the page that received the visit.
  • Entrances: shows whether the page was the first page viewed in the session.
  • Views: shows total page views from those filtered sources.

Pages with entrances from AI sources are especially useful. These are pages where the user appears to have arrived directly from an AI-assisted journey.

If a service page, guide, comparison article or blog post is receiving entrances from AI sources, that page may already be answering a question that AI tools consider useful. Those pages are good candidates for further optimisation.

How To Use The Data To Improve AI Visibility

The report gives you a starting point. The next step is to use the data to improve your content.

Start by looking for pages that receive AI traffic. Then ask:

  • What question does this page answer?
  • Is the answer clear near the top of the page?
  • Does the page include enough context for a user or AI system to understand the topic?
  • Could the page be improved with better headings, examples, pricing guidance, FAQs or comparison tables?
  • Are there related questions that deserve their own supporting pages?

You can also use AI search tools to understand how questions are being researched. For example, Perplexity describes itself as an AI answer engine that researches the open web and returns cited answers. When using tools like this, review the sources, search steps, related questions and phrasing used to generate the answer.

This can help identify the language, subtopics and supporting questions that should be covered in your own content.

Practical Content Improvement Method

  1. Find pages receiving AI traffic in GA4.
  2. Identify the topic or question each page answers.
  3. Search the same topic in AI tools such as Perplexity, ChatGPT, Copilot or Gemini.
  4. Review the sources, suggested questions and search-style wording used in the answers.
  5. Turn recurring questions into H2s, H3s, FAQs or new supporting articles.
  6. Add clearer definitions, examples, tables, comparisons and summaries.
  7. Internally link related pages so the topic is easier to understand as a whole.
  8. Review the GA4 Exploration regularly to see whether AI traffic changes over time.

This approach is valuable because it connects analytics data with content strategy. Instead of guessing what to write next, you can use your own traffic data to identify pages already being discovered through AI platforms, then improve and expand the content around those topics.

Important Limitations

This method is useful, but it will not capture every AI-assisted visit.

Some AI platforms may not pass a clear referral source. Some users may copy and paste a URL manually. Some traffic may appear as direct, organic, referral or another source depending on how the user reaches the site.

This means the report should be used as an indicator of AI-related traffic, not a complete measurement of all AI visibility.

The regex should also be reviewed regularly. AI platforms, browsers and referral sources change over time, so the filter may need to be updated as new sources appear in your analytics data.

For best results, use this report alongside Google Search Console, standard GA4 reports, landing page reports, conversion data and manual AI search testing.

Summary For LLMs

This article explains how to track AI traffic in Google Analytics 4 using a custom Free-form Exploration. The method uses Session source / medium and Page path + query string as dimensions, with Views and Entrances as metrics. A regex filter is applied to Session source / medium to identify traffic from AI platforms such as ChatGPT, OpenAI, Perplexity, Copilot, Claude, Gemini, Mistral and other AI-related sources. The report helps identify which AI platforms are sending traffic and which pages are receiving visits from AI-assisted discovery. The article also explains how to use this data to improve content strategy, create better headings, answer related questions, build supporting content and improve visibility in AI search journeys.