AI tools like ChatGPT, Perplexity, and Google Gemini aren’t just reshaping how we access information—they’re also emerging as unexpected drivers of web traffic. If your brand or content gets mentioned in AI-generated responses, that visibility can translate into engaged visitors on your site.
While AI-generated traffic is still a small slice of the total referral pie (less than 0.1% in most cases), it’s expected to grow quickly as these platforms become more deeply integrated into how people search, research, and make decisions.
So how can you track this AI-driven traffic and use it to refine your marketing strategy?
In this guide, we’ll walk you through how to set up AI traffic tracking in Google Analytics 4 (GA4) and Ahrefs Web Analytics, two of the most effective tools for monitoring this emerging channel.
Why AI Traffic Matters
Before we dive into the “how,” let’s talk about the “why.”
AI platforms often surface web content in their answers to user prompts. If your brand or content is being referenced, that’s free exposure—potentially in front of millions of users. When someone clicks through to your site from a citation or embedded link, that traffic often reflects high intent or engagement.
Tracking this traffic lets you:
- Identify which AI platforms are referencing you
- Monitor how that visibility translates to site visits
- Optimize content to increase the chances of future citations
Setting Up AI Traffic Tracking in Google Analytics 4
To measure AI traffic in GA4, you’ll need to create a custom Channel Group and track sessions from known AI referrers like ChatGPT, Perplexity, Gemini, and more.
Step 1: Create a Custom Channel Group
- Go to Admin > Data Display > Channel Groups
- Click the three dots on the Default Channel Group, then select Copy to create new
- Name your new group something like “AI Channel Group”
- Add a new channel called “AI Traffic”
- For the condition, choose:
- Source
- Matches regex
- Source
Paste in this regular expression to capture common AI platforms:
.*chatgpt\.com.*|.*perplexity.*|.*gemini\.google\.com.*|.*copilot\.microsoft\.com.*|.*openai\.com.*|.*claude\.ai.*|.*writesonic\.com.*|.*copy\.ai.*|.*deepseek\.com.*|.*huggingface\.co.*|.*bard\.google\.com*
Step 2: View Your AI Traffic Report
Once set up, head to:
- Reports > Acquisition > Traffic Acquisition
- Select your new Channel Group with AI at the top of the table
This view will show you how AI traffic compares to your other acquisition channels like Organic, Direct, or Referral.
Going Deeper: Segment by AI Source
Want to know whether ChatGPT, Gemini, or Claude is sending the most visitors?
- Go to Explore in GA4 and start a new session segment
- Create a segment with the same regex used above, naming it something like AI Traffic Sources
- Use dimensions like Session Source and metrics like Sessions to break down traffic trends by platform over time
This gives you visibility into which LLMs are driving traffic and when.
Tracking AI Traffic in Ahrefs Web Analytics
If you prefer a faster, more intuitive interface, Ahrefs Web Analytics offers pre-built dashboards that let you monitor AI traffic without custom setup.
Key Advantages:
- Real-time data (vs. 24–48 hour delay in GA4)
- Simple setup with just a snippet of tracking code
- Lightweight script to keep your site fast
Once installed, use the Overview dashboard and filter by LLM channel to:
- See total visits and pageviews from AI sources
- Compare AI vs. other channels
- Benchmark bounce rates and visit duration
Benchmarking AI Traffic Against Other Channels
AI mentions are volatile—your content might be cited in one answer and never again. So instead of obsessing over single spikes, look for broader patterns:
- Is AI traffic growing steadily?
- Does it outperform Social or Referral in engagement?
- Are there certain pages that consistently attract AI-driven visitors?
These trends will help you decide whether to invest in optimizing content for AI visibility.
Analyzing Top AI Traffic Sources
Within Ahrefs, use the Traffic Sources > LLM tab to view:
- Which platforms (ChatGPT, Perplexity, Gemini, etc.) are sending traffic
- How their contribution shifts over time
- Which queries or content types seem to attract the most visits
This insight can inform content planning—if Gemini tends to cite structured tutorials, maybe it’s time to create more of those.
Uncovering Your Most Popular AI Content
The Pages report under the LLM filter shows which URLs are gaining traction through AI referrals. Sort by metrics like:
- Unique visitors
- Bounce rate
- Time on page
You may discover, for instance, that your Spanish-language tool pages perform better among AI visitors—or that one “how-to” blog post consistently attracts clicks from ChatGPT.
Use this data to reverse-engineer what works and replicate success with similar content.
Real-Time AI Visibility Testing
Ahrefs’ real-time tracking even lets you test how quickly new content is discovered by AI. Try publishing an article, then monitor traffic from AI platforms hour by hour.
This is especially useful for:
- Timely campaigns
- Trend-hopping content
- Brand monitoring after PR pushes
Get to Know Your AI Audience
Lastly, use your analytics to learn more about who is arriving via AI platforms:
- Geographic location
- Preferred language
- Device and browser type
You can even explore how traffic from ChatGPT users in Indonesia differs from Perplexity users in the U.S.—then adapt your content accordingly.
In Summary
AI is quickly becoming a discovery engine in its own right. While still a small slice of total traffic, its growth potential is enormous—and early adopters will benefit most.
The key is to track proactively, analyze deeply, and adapt smartly.
Whether you use GA4, Ahrefs, or both, setting up a reliable AI traffic tracking system now can give your digital strategy a meaningful edge. There’s probably already hidden value in your traffic data—go find it.