How to Track LLM Traffic in Google Analytics 4

Cody Schneider4 min read

Curious about that unexplained spike in "(direct)" traffic inside your Google Analytics 4 reports? You might be looking at visitors from AI assistants like ChatGPT, Perplexity, and Google's new Search Generative Experience. This article walks you through exactly why this happens and how to set up GA4 to correctly track your LLM traffic so you can see its true impact on your business.

What Exactly is LLM Traffic?

Large Language Model (LLM) traffic, also called generative AI or generative search traffic, refers to visitors who land on your website from a link provided by an AI chatbot or search experience. When users ask questions to assistants like ChatGPT, Gemini (formerly Bard), Perplexity, or Claude, these models often cite their sources by linking directly to websites. This creates a new and valuable referral channel.

Unlike traditional search, where users click one of ten blue links, LLMs synthesize information from multiple sources and present a curated answer with source links. For you, this means the traffic you get from these platforms is often highly intentional. These aren't just browsers, they're users who have a specific question, saw your site recommended as a credible answer, and clicked a link to learn more. That's a high-quality visitor you definitely want to understand more about, from their traffic source to where they landed and what they did during their session journey.

Why Does Google Analytics Classify LLM Traffic as "Direct"?

The core of the problem lies in something called "referrer policies." When a user clicks a link from most third-party platforms to your site, their browser sends referrer data - information that tells you where they came from (e.g., YouTube's domain youtube.com).

However, nearly all major LLMs, including ChatGPT and other chatbot tools, use a restrictive referrer policy like strict-origin-when-cross-origin. This is a privacy-first choice but a downside for data experts who want to dig beyond "Direct traffic." It results in your website's server logging only the source site's domain, not the specific URL. Without path information, Google Analytics 4 gets confused and buckets this traffic under "Direct," rather than a specific referral source like "AI/Bot."

Step-by-Step Guide to Creating a Custom Traffic Group for Your Gen AI Sources

To regain control and improve accuracy in Google Analytics, you can define a "channel definition rule" within your administration panel. Follow these straightforward steps to set up your custom traffic group.

Find Channel Group Settings

  1. Navigate to the Admin section of your GA4 property (the gear icon on the bottom-left sidebar of the analytics navigation links).
  2. Under the Property column, click on Data Settings, then go to Channel Groups.
  3. GA4 should have a default Channel Group. Clone it instead of modifying the primary configuration - this acts as a backup.

Cloning and Naming Your Channel Group

  • Click on Clone Group. Name the new group something indicative, like My Default Channel Group with GENAI.
  • Add AI-specific traffic sources by typing Session source / medium MATCHES openAI or other domains you've identified in your reports, such as perplexity.AI.
  • Continue adding domains using Regex for efficient grouping. For instance, use a pattern like (chat\.openai\.com|perplexity\.ai|gemini\.google\.com|bard\.google\.com|claude\.ai|writesonic\.com|pi\.ai|you\.com|neeva\.com).

Adding a New AI Custom Filter Condition

  • Select Session Source as your traffic source type: 'dimension.'
  • Select matches regex for the Operator field from the options available.
  • Enter the regex code you saved to group your AI traffic sources conveniently.
  • Click Apply twice or save on pop-up prompts to confirm your new configuration.

Alternative Proactive Step: Use UTM Tracking

Use UTM parameters to identify and track where the users are coming from, especially useful for AI-driven traffic. For instance, you might create a URL like https://yourwebsite.com/product-page?utm_source=CHATGPT&utm_medium=referrals&utm_campaign=LLM_RESP. This method can be complex but provides detailed insights.

Analyzing Traffic Using Reports in Google Analytics

Tracking campaigns through UTM tags allows you to gain insights from Google Analytics reports. Navigate to Acquisition > Traffic Acquisition in GA4 and filter by your UTM source. This helps in user analysis, knowing the source of traffic, and examining trends in user engagement and conversions.

Key Metrics to Compare

  • Conversions: Evaluate if AI-driven traffic is completing goals, like email signups, product contact forms, or other key actions.
  • Engagement Rate & Average User Session Time: Compare these metrics with organic or search-driven traffic to assess visitor interest and relevancy.

Final Thoughts

Implementing these techniques can take your AI traffic reporting to the next level. With GA4 reports configured, you're ready to keep improving your analysis efforts. Changes in your marketing landscape should adapt seamlessly, which is why we recommend staying updated with the latest tools and features.

We created Graphed to help businesses manage these changes effectively and stay organized. Visit us to learn more and be part of our evolving platform.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.