How to Detect AI Agent Traffic in Your Analytics
AI shopping agents are visiting e-commerce stores right now, but most merchants have no idea whether they are being crawled or completely invisible. This tutorial walks you through four methods to detect AI agent traffic so you can measure what matters and take action.
Key Stat
AI-referred e-commerce traffic surged 805% year-over-year on Black Friday 2025
Adobe Analytics data confirms that AI-driven shopping traffic is not a future trend. It is happening now. If you cannot see this traffic in your analytics, you have a measurement problem, not a traffic problem.
AI traffic surge on Black Friday YoY
AI-driven visits to retail sites
Retailers taking no AI prep steps
Search traffic drop from AI suggestions
Most e-commerce merchants in 2026 are asking the same question: are AI shopping agents actually visiting my store? If ChatGPT, Google AI Mode, or Perplexity are recommending products, are mine among them, or am I invisible?
The frustrating truth is that standard analytics tools were not designed to track AI agent visits. Google Analytics 4 requires JavaScript execution, and most AI bots do not run JavaScript. That means the fastest-growing traffic source in e-commerce is also the one most likely to be invisible in your dashboard.
This tutorial shows you four practical methods to detect and measure AI agent traffic, from quick GA4 workarounds to definitive server log analysis. Whether you run WooCommerce, BigCommerce, or Magento, these methods work regardless of your platform.
Why You Need to Track AI Agent Traffic
AI-driven traffic to retail sites spiked 357% year-over-year, reaching 1.13 billion visits according to Similarweb data. That traffic converts differently than organic search, often at higher intent because the shopper has already described exactly what they want to an AI agent.
If AI agents are crawling your store, it means your products have a chance of being recommended. If they are not crawling you, your products are invisible to this channel entirely, and no amount of product quality or competitive pricing will matter because the agents do not know you exist.
Tracking AI agent traffic tells you three critical things:
- Visibility status: Are you being crawled at all, or are you invisible to AI shopping agents?
- Crawl patterns: Which pages are agents visiting? Product pages, category pages, or just your homepage? This reveals what agents think is important about your store.
- Optimization impact: After you implement structured data, LLMs.txt, or feed improvements, you can measure whether AI agent crawl frequency and depth increase.
Known AI Agent User Agents
Every bot that visits your site identifies itself with a user-agent string in the HTTP request header. Here are the AI-related user agents you should be monitoring in 2026:
| User Agent | Company | Purpose |
|---|---|---|
| OAI-SearchBot | OpenAI | ChatGPT Shopping and search features |
| GPTBot | OpenAI | General web crawling for AI training and retrieval |
| Googlebot | Search indexing including AI Mode crawling | |
| PerplexityBot | Perplexity | AI search and product discovery |
| ClaudeBot | Anthropic | Web research and content retrieval |
| Applebot-Extended | Apple | Apple Intelligence and Siri shopping features |
| Bytespider | ByteDance | TikTok search and AI features |
| CCBot | Common Crawl | Open dataset used by many AI companies for training |
Important: Googlebot handles both traditional search indexing and AI Mode crawling. You cannot distinguish between them by user agent alone. However, increased Googlebot activity on product pages after Google AI Mode launched in your market is a strong signal that AI Mode crawling is happening.
Method 1: Google Analytics 4 (GA4)
GA4 is the most widely used analytics tool, but it has a fundamental limitation for AI bot detection: it requires JavaScript execution. Most AI bots request your HTML, parse the content, and leave without ever running your tracking scripts. That means GA4 will not show you the majority of AI agent visits.
What GA4 Can Show You
While GA4 misses the bot visits themselves, it can capture human traffic that originates from AI platforms. When a shopper clicks a product link inside ChatGPT, Perplexity, or another AI tool, that click shows up as referral traffic in GA4.
How to Create an AI Referral Segment
- Open GA4 and navigate to Explore.
- Create a new exploration and add the Session source dimension.
- Add a filter for session source containing any of:
chat.openai.com,chatgpt.com,perplexity.ai,gemini.google.com,claude.ai, orbing.com/chat. - Add metrics for Sessions, Engaged sessions, Conversions, and Revenue.
- Save this exploration as "AI Referral Traffic" and check it weekly.
What This Data Tells You
AI referral traffic in GA4 represents shoppers who clicked through from an AI recommendation to your store. This is the downstream conversion data. It does not tell you how often AI bots crawl your site, but it does tell you whether AI agents are actually sending you customers. If you see referral traffic from chatgpt.com or perplexity.ai, AI agents are already recommending your products.
If you see zero AI referral traffic, that does not necessarily mean agents are not crawling you. It may mean they are indexing your data but have not yet recommended your specific products to a shopper. Or it may mean you are invisible. The next methods will help you distinguish between these scenarios.
Method 2: Server Access Logs
Server access logs are the definitive source of truth for AI bot detection. Every HTTP request to your server is recorded in these logs, including requests from bots that never execute JavaScript. This is where you will find the real picture of AI agent activity on your store.
Where to Find Your Access Logs
- Apache: Typically at
/var/log/apache2/access.logor/var/log/httpd/access_log - Nginx: Typically at
/var/log/nginx/access.log - cPanel: Go to Metrics > Raw Access in your cPanel dashboard
- Managed hosting: Check your hosting provider's control panel under Logs or Analytics
Commands to Detect AI Bot Traffic
Use these commands via SSH or your hosting terminal to filter your access logs for AI agent visits:
# Count total AI bot visits
grep -E "OAI-SearchBot|GPTBot|PerplexityBot|ClaudeBot|Applebot-Extended|Bytespider|CCBot" access.log | wc -l
# See which AI bots visited and when
grep -E "OAI-SearchBot|GPTBot|PerplexityBot|ClaudeBot" access.log | awk '{print $4, $1, $12}'
# Count visits per AI bot type
grep -oE "OAI-SearchBot|GPTBot|PerplexityBot|ClaudeBot|Applebot-Extended|Bytespider|CCBot" access.log | sort | uniq -c | sort -rn
# See which product pages AI bots are crawling
grep -E "OAI-SearchBot|GPTBot|PerplexityBot|ClaudeBot" access.log | grep "/product" | awk '{print $7}' | sort | uniq -c | sort -rn | head -20What Patterns to Look For
- Crawl frequency: Are AI bots visiting daily, weekly, or sporadically? Increasing frequency means your store is gaining AI visibility.
- Page depth: Are bots only hitting your homepage, or are they crawling deep into product and category pages? Deep crawling is a strong signal that agents find your data valuable.
- Response codes: Check for 200 (success), 301/302 (redirects), and 403/404 (blocked or not found) responses. If AI bots are getting 403 errors, your server configuration or WAF may be blocking them.
- Pages visited: Which product pages get the most AI bot attention? This tells you which products agents consider worth indexing.
Method 3: Cloudflare Analytics
If your store sits behind Cloudflare, you have access to bot analytics data that most merchants overlook. Cloudflare sees every request before it reaches your server, including bot traffic that your server logs might miss if Cloudflare caches the response.
How to Check Cloudflare Bot Analytics
- Log into your Cloudflare dashboard and select your domain.
- Navigate to Security > Bots to see the bot traffic overview.
- Look at the Bot Traffic section to see the breakdown between verified bots, unverified bots, and human traffic.
- Under Verified Bots, look for the AI-specific crawlers. Cloudflare categorizes GPTBot, ClaudeBot, PerplexityBot, and others as verified bots when they use their official IP ranges.
Setting Up Notifications
Cloudflare allows you to create firewall rules and notifications for specific bot traffic patterns. Create a notification that alerts you when a new AI bot user agent appears in your traffic for the first time. This way, you will know immediately when a new AI agent starts crawling your store, without having to check logs manually.
You can also use Cloudflare's Firewall Events log to see exactly which pages each bot visited, the response codes returned, and whether any requests were challenged or blocked. If your Cloudflare security settings are too aggressive, they may be blocking legitimate AI bots, which makes you invisible to those agents.
Method 4: robots.txt Analysis
Before you can detect AI traffic, you need to make sure you are not accidentally blocking it. Your robots.txt file is the first thing any well-behaved bot checks, and a misconfigured robots.txt can make your entire store invisible to AI agents.
Common Mistakes That Block AI Bots
- Blanket Disallow: A rule like
User-agent: * / Disallow: /blocks every bot, including AI agents. This is surprisingly common on stores that copied a restrictive robots.txt without understanding it. - Blocking specific AI bots: Some merchants added
Disallowrules for GPTBot or CCBot in 2023-2024 when AI scraping concerns peaked. Those rules are now blocking the very agents that could drive sales. - Blocking CSS and JavaScript: Rules that block
/wp-content/or/assets/prevent bots from rendering your pages properly, which means they cannot verify your structured data matches your visible content.
How to Audit Your robots.txt
Visit yourstore.com/robots.txt in your browser right now and check for any Disallow rules that might affect AI bots. Then compare it with the recommended configuration below.
# Recommended robots.txt for AI-ready e-commerce stores
User-agent: OAI-SearchBot
Allow: /
User-agent: GPTBot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: ClaudeBot
Allow: /
User-agent: Applebot-Extended
Allow: /
User-agent: Googlebot
Allow: /
User-agent: Bytespider
Allow: /
User-agent: *
Allow: /
Disallow: /cart
Disallow: /checkout
Disallow: /account
Disallow: /admin
Sitemap: https://yourstore.com/sitemap.xmlPractical takeaway: Check your robots.txt right now. If you see any Disallow rules targeting AI bots, remove them immediately unless you have a specific business reason to block that bot. Every day you block AI agents is a day your competitors gain visibility you are losing.
What to Do With the Data
Once you have measured your AI agent traffic using the methods above, the data falls into one of three scenarios. Each requires a different response.
Zero AI Agent Traffic
Your store likely has fundamental discoverability issues. AI agents cannot recommend products they have never seen. Start with the basics: verify your robots.txt is not blocking bots, submit your sitemap to search engines, implement schema markup on product pages, and set up a LLMs.txt file.
Run your free Agent Ready Score to identify gaps →Some AI Agent Traffic
You are on the radar but may have gaps. Check which pages are being crawled versus which are ignored. If bots hit your homepage but skip product pages, your internal linking or site structure may be weak. If they crawl products but you see no referral conversions, your product data may not be competitive enough for agents to recommend.
Learn what AI agents evaluate before recommending →Growing AI Agent Traffic
You are on the right track. Now focus on optimization: enrich your structured data with more optional fields, improve product descriptions for AI readability, and monitor which specific products get the most bot attention. Double down on what is working and extend those patterns across your catalog.
Explore the full agentic commerce playbook →Regardless of which scenario you are in, the most important step is to establish a measurement baseline today. Check your server logs, set up your GA4 AI referral segment, and audit your robots.txt. Then revisit these numbers monthly to track the impact of every optimization you make. The merchants who measure AI traffic are the ones who can systematically improve it.
Frequently Asked Questions
Not Sure If AI Agents Can Find Your Store?
Our free Agent Ready Score scans your product pages for the structured data, technical setup, and crawlability signals that AI shopping agents check before recommending products. Find out in 30 seconds whether your store is visible or invisible.