Marketing Analytics
track AI and LLM chatbot traffic

How to Track AI and LLM Chatbot Traffic in GA4

Get expert tips and strategies on tracking AI and LLM chatbots in GA4. Learn how to apply these techniques for better results!
Optimize your AI chatbot tracking today!
|
Updated:
May 6, 2025
How to Track AI and LLM Chatbot Traffic in GA4

Contents

Get Your
Free Marketing Plan

Limited Time Offer

Key Takeaways

  • Tracking AI Traffic: Set up custom events in GA4 to capture AI-driven interactions, including chatbot clicks and AI-assisted navigation.
  • Exploring AI Referrers: Use GA4 Explore to identify AI sources like ChatGPT and Google Gemini by applying regex filters.
  • Custom Parameters: Implement Google Tag Manager for tracking specific AI interactions and register custom dimensions in GA4.
  • Reporting with Looker Studio: Visualize AI traffic trends and analyze its impact on conversions using custom reports and segments in Looker Studio.
  • While Google maintains around 90% of the global search market share, new data shows a fast-growing shift toward LLM-based search. This change stems from two major technological breakthroughs reshaping how users find information.

    First, Retrieval Augmented Generation (RAG) allows tools like ChatGPT with Search and Perplexity to deliver live, real-time results, unlike older, static models. Second, LLMs are now built into websites as chatbots, support widgets, and AI search bars, reshaping how users find answers and interact with businesses.

    To track this shift accurately, you need to measure chatbot traffic inside Google Analytics 4 using the right structure and parameters.

    In this guide, we’ll show you how to track AI and LLM chatbot traffic inside GA4, uncover key user behaviors, and optimize for conversions.

    What Is AI Traffic in GA4?

    AI traffic refers to any website visit that originates from a generative AI assistant or language model interface, such as ChatGPT, Perplexity, Bing Copilot, Claude, or Google’s Gemini.

    In fact, 63% of websites already receive traffic from AI tools. ChatGPT alone drives 50% of that, making it the single largest AI referrer. In total, just three chatbots account for 98% of all AI-driven visits. On average, AI chatbots account for 0.17% of total website traffic, but the percentage climbs higher for smaller sites.

    AI traffic enters through three primary paths, including:

    • Visible referral links from AI bots or branded agents like chat.openai.com.
    • Embedded LLM chatbots placed directly on your website.
    • API-driven bots that fetch live data from your site as part of a response.

    Why Track AI and LLM Chatbot Traffic?

    One of the current debates within the SEO industry centers on whether tools like ChatGPT and other LLMs should be classified as search engines.

    What is clear, however, is that user behavior is shifting significantly.

    People now use Meta AI, ChatGPT, and even TikTok to search, make decisions, and take action. As discovery spreads across platforms, your SEO strategy must adapt to follow user intent across every entry point.

    You need to ask new questions:

    • Which AI interactions bring traffic?
    • Which sessions convert?
    • How do these journeys compare to search or social?

    Without accurate tracking, you risk underreporting performance and misjudge which touchpoints influence discovery and conversion.

    GA4 does not automatically categorize these sessions as “AI traffic.” Instead, you may see them incorrectly grouped under:

    • Direct
    • Referral
    • Unassigned

    Some AI tools strip referrer data entirely, while others use vague or misleading domains. As a result, your reports may undercount or misattribute AI-driven sessions.

    GA4 also fails to surface LLM query context or chatbot triggers in event data. You won't see which prompt led to the click or what type of user behavior occurred before it. Without customization, the platform gives you limited insight into how AI tools influence your traffic or conversions.

    To fix this gap, you’ll need to identify, tag, and track AI-based interactions manually or through server-side tracking. We'll show you exactly how to do that in the next section.

    But traffic isn’t the only issue—AI also impacts how attribution and keyword strategy function. You face new challenges with link visibility and attribution.

    AI tools often summarize content without passing a backlink or referring domain. That weakens traditional strategies like SaaS link building, where attribution plays a direct role in ranking and authority.

    At the same time, AI is changing how users discover and phrase their needs:

    You need to track these changes to protect traffic, retain visibility, and measure the impact of Google AI Overviews on SEO and organic traffic. 

    Consider how SentinelOne navigated this shift. With TripleDart Digital, the company built a robust SEO foundation tailored for long-form, high-intent content that aligns with how users now search and make decisions through AI tools.

    That strategy led to a 250% growth in qualified organic traffic, expanding their keyword footprint by 450% and unlocking high-value business opportunities.

    How to Set Up AI Traffic Tracking in GA4

    Since GA4 doesn’t natively recognize or label traffic from AI tools, you have to create your own system for tagging, collecting, and reporting that data. That means customizing your reporting setup with filters, events, dimensions, and visualizations that specifically track AI-related activity.

    Here’s how.

    1. Using GA4 Explore Reports

    Start with GA4’s Explore section to surface potential AI referrers and unusual traffic patterns. This method helps you find baseline indicators without creating new tracking infrastructure.

    Step #1: Open GA4 and Launch a Free-Form Exploration

    Go to the Explore tab inside your GA4 account. Select Free Form as the exploration type. This layout provides flexibility to combine dimensions and metrics for in-depth analysis.

    Step #2: Add Dimensions

    GA4 Explore setup showing "AI Referrals" with dimensions for various metrics
    GA4 Explore configuration to track AI referral traffic

    Click the plus icon next to Dimensions and import the following:

    • Session source/medium
    • Page referrer
    • Landing page

    In the Metrics section, click the plus icon again and choose Sessions to display how many visits each source drives. Based on your goals, you can also add extra metrics and dimensions:

    • Engagement rate helps you measure how visitors interact with the page.
    • Events shows how many conversions or key actions come from AI traffic.
    • Date and time reveals when your site receives the most AI-driven visits.

    After choosing your variables, double-click each name or drag them into the free-form section on the right. GA4 will generate a table with your selected data, but at this stage, it still shows all referral traffic, just like a standard report.

    GA4 table showing top 10 page referrers by session count, with Google leading at 49,120 sessions
    Top traffic sources by sessions

    Step #3: Use Regex Formulas

    Apply a filter to the Session source/medium dimension to isolate chatbot traffic. Use a regex string like:

    (chat\.openai|gemini\.google|copilot\.microsoft)

    If you want broader coverage, add more domains known for AI referrals, such as:

    (chat\.openai|gemini\.google|copilot\.microsoft|perplexity\.ai|meta\.ai)

    This filter narrows the view to sessions likely triggered by chatbot interactions. From here, you can analyze landing pages, traffic volume, and engagement tied to AI-driven visits.

    2. Creating Custom Events and Dimensions

    If you want more control over how GA4 captures AI chatbot interactions, you can create custom events and dimensions. This way, you can track user actions that don’t appear in default reports, such as link clicks generated by chatbots or AI-assisted navigation.

    Using Google Tag Manager (GTM)

    Step #1: Set up a trigger to detect link clicks

    Start by setting up a trigger in GTM that detects link clicks related to AI chatbot interactions.

    There are two types of click triggers in Google Tag Manager: All elements and Just links. As the names suggest, the All elements trigger tracks clicks on any element (link, image, button, etc.), while the Just links trigger tracks clicks on links only.

    Choose the trigger type in GTM
    Choosing the trigger type

    Choose the “Click – Just Links” trigger type, and use conditions like URL patterns or CSS selectors to narrow the scope.

    Step #2: Configure a Tag to Send a Custom Event

    Next, configure a tag that sends a custom event to GA4 when the trigger fires. You should:

    • Create a new tag in GTM and choose Google Analytics: GA4 Event as the tag type.
    • Name the event something specific, like ai_chatbot_click, to clearly identify the chatbot interaction.
    • Add relevant parameters, such as menu_item_url and menu_item_name, to capture additional context about the interaction. These parameters will help provide insights into the specific AI-driven actions users take.
    GA4 event setup showing the event name "menu_click" with parameters for URL and item name
    Set up a GA4 event with custom parameters
    Step #3: Test the Tag

    Before publishing, use GTM’s Preview Mode to test your tag:

    • Verify that the tag fires correctly when an AI chatbot interaction occurs.
    • Check that the event is correctly triggered and that the data is being sent to GA4 as expected.

    Once confirmed, publish the tag to make it live.

    Step #4: Register Custom Parameters

    After the tag is working properly, register the parameters (e.g., menu_item_url, menu_item_name) as Custom Dimensions in GA4. Follow these steps:

    • Navigate to Admin > Custom Definitions in GA4.
    • Register each parameter to make it available for detailed reporting.

    This step allows you to break down chatbot-driven activity and track specific interactions across your site.

    Direct GA4 Configuration

    Step #1: Navigate to Events in GA4

    Open your GA4 property and go to the Events section under Configure in the left-hand menu. Click on Create Event to set up a new custom event dedicated to tracking AI chatbot interactions,

    GA4 dashboard showing existing events and an arrow pointing to the "Create event" button
    Creating an Event in GA4
    Step #2: Create a New Event for AI Chatbot Interactions

    Once in the Create Event screen, define the new event for AI chatbot activity:

    • Name the event to make it clear that it's related to chatbot activity.
    • Set up conditions based on the triggers for AI interactions, such as specific button clicks or URL patterns associated with the chatbot. These conditions ensure the event is recorded only when a user engages with the AI chatbot.
    Step #3: Define Parameters to Capture Relevant Data Points

    To add more context to the event, define parameters that capture key details about each AI interaction.

    For instance, parameters such as menu_item_url and menu_item_name will help you track exactly what the user engaged with on the chatbot interface. These parameters allow you to gather specific insights into how the chatbot is being used and what actions are driving user engagement.

    Step #4: Register Parameters

    After defining your custom event and its parameters, register the parameters as Custom Dimensions for detailed reporting.

    In GA4, go to Admin > Custom Definitions and add each parameter (like menu_item_url or menu_item_name) as a new custom dimension.

    This step ensures that you can segment and analyze chatbot interactions within your GA4 reports, allowing you to track user behavior and make data-driven decisions based on specific AI chatbot interactions.

    Now, you have a fully configured system for tracking AI chatbot interactions directly within GA4, without needing to use Google Tag Manager. 

    3. Reporting with Looker Studio

    To get a clear view of these trends, create custom reports and explorations in GA4, as outlined in the earlier sections. Once you’ve isolated AI traffic with segments or dimensions, bring that data into Looker Studio for more flexible and visual analysis.

    Start by opening Looker Studio and creating a new report.

    • Click Add Data, then select your GA4 Property.
    Looker Studio showing sample data sources selection screen during report creation
    Choose sample data sources in Looker Studio
    • Once connected, click Edit Connection and choose Refresh Fields to pull in the latest custom dimensions or event parameters.

    After refreshing, add your Custom AI Traffic Segment to the report:

    • Use line charts to show how AI traffic evolves over time.
    • Compare it against total sessions, conversions, or engagement to understand its role in the overall journey.

    Looker Studio gives you more control over how you visualize and communicate the impact of AI referrals across your site.

    How to Identify and Filter Bot Traffic in GA4

    To track meaningful data in GA4, you must separate AI bot traffic from scraping bots and obvious spam. AI bots often simulate human interaction patterns, while scrapers and spam bots trigger irrelevant sessions and inflate metrics.

    Identifying Bot Traffic in GA4

    If you want to identify bot traffic in GA4, you can customize reports, look for suspicious patterns like short session durations or unrealistic page views, and utilize GA4's built-in bot traffic exclusion.

    Here’s how:

    1. Customize Reports

    Open GA4 and go to the “Traffic acquisition” or “Traffic sources” reports. 

    Add metrics like session duration, engagement rate, and bounce rate. These reports help you spot unusual traffic patterns linked to suspicious referrers or non-human behavior.

    2. Recognize Suspicious Patterns

    Look for short session durations, unrealistic page views, or odd behaviors like multiple form fills without scroll activity.

    A spike in spam comments or declined card transactions can also point to bot traffic attempting fraudulent actions.

    3. Analyze Traffic Sources

    Check the referrer and session source data for unrecognized domains or traffic spikes from unlikely countries. Use secondary dimensions to add IP addresses, device category, or user agents for deeper insight.

    4. Use Segments to Isolate Patterns

    Create custom segments to group traffic with low engagement, high bounce rates, or unusual session behavior.

    Follow these steps to build a segment:

    • Go to any report and click "Add segment" > "New segment."
    • Select "Conditions" as the segment type and choose the dimension and metric based on your conditions (e.g., bounce rate higher than 90%).
    • Save the segment.

    Use filters to view sessions from specific user agents or referrers that might be bots. Here’s how:

    • Navigate to your GA4 property.
    • Go to Admin > Data Streams.
    • Select your data stream and click "Configure tag settings."
    • Click "Show more" and then "Define internal traffic."
    • Create a rule with the IP address or range of addresses associated with bots.
    • Save the rule.

    Filtering Bot Traffic in GA4

    Now, to remove bot traffic, you can create custom segments or filters to isolate and remove specific types of traffic based on IP addresses, user agents, or other criteria.

    1. GA4’s Automatic Exclusion

    GA4 automatically filters out traffic from known bots and spiders, but this list doesn’t catch everything.

    2. Internal Traffic Filters

    Define internal traffic filters to exclude specific IP ranges used by bots or internal tools that shouldn’t appear in your reports.

    3. Custom Segments for Reporting

    Build custom segments to exclude bot-like sessions when analyzing key metrics. This helps you view clean performance data.

    4. Update Data Stream Settings

    Go to Admin > Data Streams and click your property. Use “Configure tag settings” to define rules for internal traffic using parameters like IP addresses or hostnames.

    5. Referral Exclusion List

    Apply the Referral Exclusion List to remove spammy or ghost domains that show up as referrers but never deliver engaged traffic.

    Diving Deeper into AI Traffic Insights

    Once you isolate AI traffic in GA4, you need to focus on specific metrics that reveal behavior and value. 

    You can start with these metrics:

    • Average engagement time
    • Scroll depth
    • Session duration

    These numbers tell you how long AI visitors interact with content and where they stop engaging.

    Next, measure conversion rates across goals and micro-conversions to understand how AI traffic affects actual outcomes. Watch for events triggered without final actions, as they often indicate partial or automated sessions. Track these across different journeys to spot which ones fail to convert or mimic human actions.

    Compare all metrics against your human traffic benchmarks to find gaps, spikes, or unnatural consistency. To observe how behavior changes over time, switch your exploration view to a Line Chart.

    Here’s how:

    • Click your existing AI Traffic tab, switch the visualization style to Line Chart.
    • Break it down by Session Source/Medium.
    • Add metrics like Sessions, Engagement Rate, or Conversions to the Values section to complete the chart.

    Set the date range to 90 days and granularity to week so trends appear clearly across time.

    Mastering the Shift: What to Do After Tracking AI Traffic

    You can’t treat AI or LLM-generated visits like normal traffic. Their patterns, triggers, and influence need separate tracking. Furthermore, AI sessions often inflate engagement or trigger false conversions, which skews your reporting. Segment them before they distort real behavior.

    GA4 gives you a starting point, but it lacks built-in filters for LLMs or emerging AI tools. That’s why you need custom segments, smarter channel grouping, and layered metrics to see clearly.

    As GA4 evolves, continue to track every new feature that improves AI traffic visibility.

    TripleDart Digital helps you set up what GA4 doesn’t. Our GA4 migration services can help you fine-tune tracking setups that keep up with Google’s rapid changes. If you’ve migrated recently and missed key configurations, our team can rebuild your setup from the ground up.

    Don’t wait for perfect data. Test, track, compare, and refine based on real user journeys. With AI SEO tools and reporting dashboards built around behavior patterns, TripleDart can help you measure impact, not just impressions. We also track Google’s algorithm changes in real time, so you see exactly what shifted and why.

    Ready to future-proof your analytics? Book an intro call today to set up AI traffic tracking and gain a competitive edge.

    FAQs

    How to track AI traffic in GA4?

    Create custom events, use regex filters for AI referrers, and build segments in GA4 Explore or Looker Studio to monitor sessions from tools like ChatGPT or Google’s Gemini.

    How to detect bot traffic in GA4?

    Check for unusual traffic spikes, zero engagement, or known bot referrers. Use filters, hostname validation, and custom dimensions to isolate and analyze suspicious or automated behavior patterns.

    How to get traffic from ChatGPT?

    Provide clear, valuable content with linkable answers. Add source-friendly URLs, engage in popular prompts, and monitor referrer data to identify traffic from chat.openai or similar domains.

    Jayakumar Muthusamy
    Jayakumar Muthusamy
    Jayakumar is the Co-Founder and Head of Revenue Operations at TripleDart, where he leads the development of scalable marketing engines and Marketing & Sales Operations for B2B businesses. Jayakumar is dedicated to helping B2B companies with demand generation and streamlining their sales processes to enhance sales closure rates.

    We'd Love to Work with You!

    Join 70+ successful B2B SaaS companies on the path to achieving T2D3 with our SaaS marketing services.