How to Track AI Referral Traffic in Google Analytics 4
Apr 08, 2025
0 Comments
Published by webmaster
Your Blog is Getting AI Traffic, But Are You Tracking It?
Guess what? Your blog might already be getting visits from AI-powered tools like ChatGPT and Perplexity! When people use these AI chatbots and click through to sources, that’s traffic coming to your site. Pretty cool, right? But if you’re not specifically tracking it, those visits might just blend in with your other referral traffic. In this friendly how-to guide, we’ll walk through setting up Google Analytics 4 (GA4) to spot and track those AI-driven visitors. Let’s make sure you can see the robo-readers hitting your blog!
Why Tracking AI Traffic is Important
◉ AI-Driven Traffic is Growing: As tools like ChatGPT and Perplexity become more popular, they’re changing how people find content online. Learn more about this shift in our post on AI Chatbots Changing Search.
◉ Hidden Visitors: Without tracking, AI referrals blend into generic “Referral” traffic, making it hard to measure their impact.
◉ Future-Proofing: As AI search tools evolve, this traffic could become a major source of visitors – you’ll want to be ready!
Finding AI Referrals in Your GA4 Traffic
◉ Open the Traffic Acquisition Report:
In GA4, navigate to Reports > Acquisition > Traffic acquisition (under the “Life Cycle” section).
● Use the search bar to filter for “Referral” traffic to focus on visits from external sites.
◉ Break Down by Session Source:
● Click the “+” icon next to the default dimension.
● Add Traffic Source > Session source as a new dimension to see specific domains (e.g., chat.openai.com).
● Switch the table to show 250 rows for a full view of referral sources.
◉Identify AI Domains:
● Scan the list for AI platforms like chat.openai.com, perplexity.ai, or bard.google.com.
● Copy these domains into a text file for later use – these are your AI traffic sources!
Building a Regex Filter for AI Traffic
◉ Create a Regex String:
● Combine your AI domains (e.g., chat.openai.com, perplexity.ai) into one regex pattern.
● Use a vertical bar | to separate domains (e.g., chat\.openai\.com|perplexity\.ai).
● The backslashes \. ensure dots are treated literally in regex.
◉ Purpose of Regex:
● This single pattern matches any referral from the listed AI domains, simplifying your filter setup.
Creating a Custom “AI Traffic” Report in GA4
◉ Duplicate the Traffic Acquisition Report:
● Go to Library in GA4’s left sidebar.
● Find Traffic Acquisition in the Life Cycle collection, click the three dots (⋯), and select Make a Copy
◉ Rename Your Report:
● Change the duplicated report’s name to “AI Traffic” (or similar).
● Add a description like “Shows only traffic from AI chatbot referrals.”
◉ Edit the Report:
● Click the three dots (⋯) and choose Edit to open the report editor.
◉ Set Session Source as Primary Dimension:
● In the editor sidebar, drag Session source to the top of the Dimensions list and set it as default.
◉ Add Your AI Regex Filter:
● In the Filters section, add a condition: Session source matches regex.
● Paste your regex (e.g., chat\.openai\.com|perplexity\.ai).
◉ Save the Report:
● Click Save and confirm changes – your custom AI Traffic report is ready!
Adding the “AI Traffic” Report to Your GA4 Menu
◉ Edit the Life Cycle Collection:
● In the Library, click the three dots (⋯) next to Life Cycle and select Edit collection.
◉ Position Your Report:
● Find AI Traffic in the available reports list.
● Drag it into the Acquisition section (e.g., below Traffic Acquisition).
◉ Save Changes:
● Click Save to update your menu.
● Check Reports > Acquisition – AI Traffic should now appear and show only AI referral data.
Wrapping Up: The Value of Tracking AI Traffic
● Spotlight on AI Visitors: Your new “AI Traffic” report highlights visits from AI tools like ChatGPT and Perplexity.
● Stay Ahead of Trends: As AI-driven search grows, tracking this traffic helps you optimize for the future. For more on optimizing your site, check out our support section on Search Engine Optimization supports.
● Actionable Insights: Seeing how much traffic comes from AI referrals lets you adapt your content strategy to this emerging audience.