How to Track AI Traffic in GA4

Ankita Pathak Avatar
✨ Summarise and Analyse the Article

ChatGPT sent us 847 visitors last month. Google Analytics labeled every single one as ‘direct traffic.’ If you’re running any kind of content strategy in 2026, this is a problem. 63% of websites now get AI traffic, but most have no idea how much or from where. Here’s how to actually track AI Traffic in GA4.

This shift is largely driven by a few key players. Three chatbots—ChatGPT, Perplexity, and Gemini—account for 98% of all AI-driven visits. Among these, ChatGPT is the single largest AI referrer, driving 50% of the traffic from AI sources. On average, AI chatbots constitute about 0.17% of total website traffic, but this percentage can be higher for smaller sites.

Here’s where it gets interesting: Generative Engine Optimization (GEO). GEO is the practice of optimizing content to be recognized, cited, and recommended within AI-generated responses from tools like ChatGPT, Gemini, and Google’s AI Overviews. Unlike traditional SEO, which focuses on website ranking links, GEO aims to ensure your content is the authoritative source an AI chooses to reference. This requires a shift from keyword-centric strategies to a focus on providing clear, comprehensive, and factual content that addresses user intent directly.

What Is AI Traffic in GA4 and Why It Matters

In 2025, search isn’t just about keywords—it’s about conversations. With AI-powered tools like Google AI OverviewsChatGPT SearchPerplexity, and Claude reshaping how people discover information, traditional SEO is no longer enough.

Enter Content for AI (CFA)—a strategic approach to creating content not just for humans, but for the AI models that deliver answers. This is about making your content the preferred source in AI-driven responses, ensuring your brand is visible even when clicks are no longer guaranteed.

AI traffic refers to any website visit that originates from a generative AI assistant, large language model (LLM) interface, or other AI-driven application. This can include sources like ChatGPT, Google’s Gemini, Perplexity, Bing Copilot, or embedded chatbots on a website. In many cases, GA4 fails to automatically categorize these sessions as “AI traffic,” incorrectly grouping them under “Direct,” “Referral,” or “Unassigned”.

Why Track AI Traffic in GA4?

Tracking AI traffic is becoming essential as user behavior shifts significantly. While Google still dominates traditional search, there is a fast-growing shift toward LLM-based search, with 63% of websites already receiving traffic from AI tools. ChatGPT alone accounts for 50% of this traffic.

Tracking AI traffic allows you to:

  • Understand which AI interactions are driving traffic and conversions.
  • Compare AI-driven journeys to those from traditional search or social media.
  • Avoid underreporting performance and misjudging which touchpoints influence discovery and conversion.
  • Assess how your website’s content performs in this new generative engine optimization landscape.

How to Set Up AI Traffic Tracking in GA4

Since GA4 doesn’t natively recognize AI traffic, you must create a custom tracking with GA4. This can be done through a few methods:

Method 1: Using GA4 Explore Reports for AI Traffic

This is a simple starting point.

track AI and LLM chatbot traffic
  • Step 1: Launch a Free-Form Exploration: Go to the “Explore” section in your GA4 account and select “Free Form”.
  • Step 2: Add Dimensions and Metrics: Include dimensions such as “Page referrer,” “Session source/medium,” and “Landing page,” and metrics like “Sessions” and “Engagement rate”.
  • Step 3: Apply a Regex Filter: Apply a filter to the “Session source/medium” dimension using a regular expression to isolate traffic from known AI referrers. Examples of domains to include are chat.openaigemini.googlecopilot.microsoft, and perplexity.ai.

Method 2: Creating Custom Events for AI Chatbot Tracking

This method provides more control and granular data.

track AI and LLM chatbot traffic
  • Use Google Tag Manager (GTM): Set up a GTM trigger to detect link clicks related to AI chatbot interactions, such as a “Click – Just Links” trigger.
  • Configure a Tag: Create a GA4 Event tag that fires when the trigger is activated. Name the event specifically (e.g., ai_chatbot_click) and add parameters like menu_item_url and menu_item_name to capture context.
  • Register Parameters: Register the event parameters as “Custom Dimensions” in GA4 by navigating to Admin > Custom Definitions. This makes the data available for detailed reporting and analysis.

Method 3: Custom Channel Grouping for AI Traffic

This allows you to categorize AI traffic retroactively.

  • Create a New Channel: In GA4, navigate to Admin > Data Display > Channel groups and create a new channel named “AI Traffic”.
  • Define Rules: Use a regex filter on the “Source” dimension to include known AI platforms.
  • Reorder Channels: Reorder the new “AI” channel so it has priority over the “Referral” channel. This prevents AI traffic from being miscategorized as a general referral.

How to Identify and Filter Bot Traffic in GA4

To get meaningful data, you must separate AI bots, which often mimic human interactions, from scraping bots and spam.

  • Recognize Suspicious Patterns: Look for short session durations, unrealistic page views, or unusual behaviors like multiple form fills without scroll activity. Spikes in traffic from a single IP address or from unlikely countries can also indicate bot activity.
  • Automatic Exclusion: GA4 automatically filters traffic from known bots and spiders, but this doesn’t catch everything.
  • Create Segments and Filters: Build custom segments to exclude bot-like sessions based on criteria like a high bounce rate or low engagement. You can also define internal traffic filters to exclude specific IP ranges associated with bots.

Analyzing AI Traffic Performance and Insights

Once you have isolated AI traffic, you need to analyze its quality and impact.

  • Key Metrics: Focus on metrics that reveal behavior and value, such as average engagement time, scroll depth, and conversion rates.
  • Visualization: Use tools like Looker Studio to visualize AI traffic trends over time. Line charts are effective for comparing AI traffic against total sessions, conversions, or engagement.
  • Compare Against Benchmarks: Compare all AI metrics against your human traffic benchmarks to identify gaps or unnatural consistency.

Common GA4 AI Traffic Tracking Mistakes to Avoid

After helping 50+ B2B SaaS companies set up AI traffic tracking, we see the same mistakes repeatedly. Here’s what kills most implementations:

Mistake #1: Not testing your regex patterns.

Half the AI referrers get missed because people copy-paste incomplete domain lists. Test your patterns with actual AI traffic data—we found 12 AI referrers that aren’t in most ‘comprehensive’ lists.

Mistake #2: Creating events that fire on every page load.

This floods your GA4 with useless data. Only trigger events on actual AI referral clicks, not visits.

Mistake #3: Forgetting about mobile apps.

ChatGPT’s mobile app uses different referrer patterns than the web version. Your tracking will underreport by 30-40% without mobile patterns.

Mistake #4: Not excluding internal traffic.

Your team testing AI links will skew your data. Set up internal traffic filters before you start tracking.

The fix? Start with conservative patterns, test with real data for two weeks, then expand your tracking based on what you actually see in your reports.

What to Do After Tracking AI Traffic

AI traffic should not be treated like normal traffic because its patterns and influence require separate tracking. Since AI sessions can inflate engagement or trigger false conversions, segment them to avoid skewed reporting. GA4’s built-in filters are limited, so you must rely on custom segments, smarter channel grouping, and layered metrics for clear insights. The key is to test, track, compare, and refine your strategy based on real user journeys. This allows you to measure the impact of your efforts, not just impressions.

Frequently Asked Questions

How much AI traffic should I expect to see in GA4?

Most websites see 0.1-0.5% of total traffic from AI sources, but this varies wildly by industry. B2B SaaS companies typically see higher percentages (0.3-1.2%) because their content answers specific technical questions AI tools reference.

Does tracking AI traffic affect my GA4 data accuracy?

No, adding custom AI tracking dimensions doesn’t change your existing data. It only adds new categorization for traffic that was previously misclassified as direct or referral traffic.

Which AI platforms should I track in GA4?

Start with the big four: ChatGPT, Perplexity , Google Gemini , and Bing Copilot. These account for 95% of AI referral traffic.

How long does it take to set up AI traffic tracking in GA4?

The basic GA4 Explore method takes 10 minutes. Custom events with Google Tag Manager take 30-45 minutes if you’re comfortable with GTM, or 2-3 hours if you’re learning as you go.

The bottom line? AI traffic isn’t going away. We’ve seen B2B SaaS companies discover that 15% of their ‘direct’ traffic was actually from AI tools. That’s attribution you can’t afford to lose. Set this up once, and you’ll finally know which AI platforms drive real business.

Discover more from OneMetrik

Subscribe now to keep reading and get access to the full archive.

Continue reading