AI Search Optimization
September 23, 2025

4 Methods to Track and Measure AI Traffic in Google Analytics 4

Written by
Satya D
Reviewed by
No items found.
Contributors:
No items found.

As generative AI tools like ChatGPT, Perplexity, and Gemini become more integrated into our lives, they are also becoming a growing source of referral traffic to websites. For marketers and data analysts, understanding and measuring this traffic is crucial.

Are your content optimization efforts paying off? Is AI a significant driver of new users?

Fortunately, Google Analytics 4 (GA4) offers several ways to isolate and analyze this traffic. Here’s a guide to the different methods, from a quick check to a permanent, automated solution, with a recommendation for the best approach.

Why you should be tracking AI Traffic

AI platforms are still in their infancy when it comes to search results leading to easier opportunities to appear in their answers. As the newest discovery channel, they still hold novelty and are drawing users in who want direct answers and don't want to deal with ads on legacy platforms.

Not to mention AI search optimization is a strong revenue driver for several companies, including ours.

Tracking traffic from AI sources allows you to:

  • Identify new growth channels: As AI search evolves, you might discover it's a significant and growing source of visitors.
  • Optimize your content: Understanding what AI-driven traffic engages with can inform your content strategy.
  • Measure user acquisition: You can see if AI is bringing in new users or engaging existing ones by looking at both traffic acquisition and user acquisition reports.

Method 1: The Quick Manual Check

If you just need a quick, occasional snapshot of your AI traffic, you can do it directly within the standard Traffic Acquisition report.

Here’s how:

  1. Navigate to Reports > Acquisition > Traffic acquisition in your GA4 property.
  2. In the table, click the dropdown menu above the first column (it usually defaults to "Session default channel group") and select "Session source / medium". You can also just select "Session source".
  1. The report will now display all traffic sources. Look for entries like chatgpt.com, perplexity.ai, and other AI-driven platforms.
  2. To narrow it down further, you can filter the report. Click "Add filter," select the "Session default channel group" dimension, and set it to exactly match "Referral". This will display only referral traffic, making it easier to identify AI sources.

Pros: Fast and requires no special permissions.

Cons: It's a manual process you have to repeat every time you want to check the data, which can be annoying.

Method 2: Creating a Saved Report

For more regular analysis, you can create a customized, saved report that is accessible with a single click from your GA4 reporting menu. This is a great balance of convenience and simplicity.

Here’s how:

  1. In the left navigation, go to the Library section. (If you don't see this, you may not have the necessary permissions).
  2. Find the "Traffic acquisition" report, click the three dots, and select "Make a copy".
  1. Give your new report a name, like "AI Traffic Report". You can also remove the charts at the top if you just want the data table by clicking the "eye" icon.
  2. Under "Dimensions," make "Session source" the default dimension for the report.
  3. Now click "Add filter."
    • Set the dimension to "Session source".
    • Set the match type to "matches regex".
    • In the value field, enter a string that lists the AI sources you want to track, separated by a pipe | symbol. The pipe symbol acts as an "OR" condition.
    • For example:
      .*chatgpt.com.*|.*perplexity.*|.*edgepilot.*|.*edgeservices.*|.*copilot.microsoft.com.*|.*openai.com.*|.*gemini.google.com.*|.*nimble.ai.*|.*iask.ai.*|.*claude.ai.*|.*aitastic.app.*|.*bnngpt.com.*|.*writesonic.com.*|.*copy.ai.*|.*chat-gpt.org.*|.*grok.x.ai.*
  4. Click "Apply" and then "Save" the report.
  5. Finally, go back to the Library, find your main report collection (e.g., "Life cycle"), click "Edit collection," and drag your new "AI Traffic Report" into the menu. Save the collection.

Now, your custom AI traffic report will appear directly in your main reporting navigation for easy access.

Pros: One-click access to filtered data; customizable.

Cons: Requires editor-level permissions to modify the report library, and the changes will be visible to everyone with access to the GA4 property.

Method 3: Create a Custom AI Channel Group

This method for tracking AI traffic integrates AI as a distinct category across all your acquisition reports, treating it with the same importance as "Organic Search" or "Paid Social".

It is more permanent and automates the grouping for you.

A custom channel group works retroactively, meaning it will apply to your historical data as well, so you can start analyzing immediately.

Here’s how:

  1. Navigate to Admin > Data display > Channel groups.
  2. Click "Copy to create new" to duplicate the "Default Channel Grouping". Give it a new name, like "Default Channel Group + AI".
  1. Click "Add new channel" and name it "Generative AI" or "AI Traffic".
  2. Under "Conditions," set the dimension to "Source" (or "Session source") and the match type to "matches regex".
  3. Enter the same regex string as before, listing your AI sources:
    .*chatgpt.com.*|.*perplexity.*|.*edgepilot.*|.*edgeservices.*|.*copilot.microsoft.com.*|.*openai.com.*|.*gemini.google.com.*|.*nimble.ai.*|.*iask.ai.*|.*claude.ai.*|.*aitastic.app.*|.*bnngpt.com.*|.*writesonic.com.*|.*copy.ai.*|.*chat-gpt.org.*|.*grok.x.ai.*
  4. Click "Save channel."
  5. This next step is critical: Click "Reorder" and drag your new "AI Traffic" channel to be near the top of the list, preferably above "Referral". This ensures that GA4 processes traffic against this rule before it gets lumped into the general "Referral" bucket.
  6. "Save" the new channel group.

Now, when you are in any acquisition report, you can switch the primary dimension to your new "Default Channel Group + AI," and you will see "AI Traffic" as its own distinct channel, automatically grouping all relevant sources together.

Pros:

  • Permanent and automated: No more manual filtering.
  • Retroactive: Applies to past data immediately.
  • Integrated: Treats AI as a primary channel, making analysis easier and more intuitive across GA4.

Cons:

  • Requires admin-level permissions.
  • You should consult with your team or whoever manages your organization's data before creating a new channel group, as it is a significant configuration change.

By setting up a custom channel group, you ensure that tracking AI-driven traffic becomes a seamless part of your regular analysis, giving you the insights you need as the digital landscape continues to evolve.

Method 4: Use an AI tracker like Surfer's AI Tracker

Surfer's AI Tracker helps you track your content and brand mentions directly within the responses generated by LLMs like ChatGPT, Gemini, and Perplexity.

This allows you to understand if you are influencing AI-generated answers before a user ever clicks a link.

The AI Tracker monitors a set of prompts you provide and identifies which domains are being cited or referenced in the AI's answers.

Apart from tracking your LLM visibility, Surfer also helps you optimize and show up for prompts to increase your AI search visibility.

Here’s how:

  1. Head to AI Tracker in your dashboard
  2. Configure your brand, topic, audience location and prompts to track.

You can use the existing prompts or enter your own.

Surfer will then analyze LLM responses for these prompts and report back with visibility and mention scores along with your average position.

You can track additional sources in the left tab to identify who else is showing up for your target prompts.

Pros:

Competitive Intelligence: Directly shows which competitors are winning in AI-generated answers.

Actionable Insights: Helps you refine content strategy by showing what kind of content and which platforms LLMs prefer to cite.

Cons:

• AI Tracker is not part of Google Analytics and is available in a subscription package.

Tracking your AI search visibility offers you a powerful, forward-looking view that complements reactive traffic analysis in GA4 perfectly.

Use the method that works best for you. What's important is that you start monitoring and optimizing for AI search results. Try Surfer's AI Tracker here.

Summarize with AI:

Keep Learning