AI crawlers, assistants, and referrals: how Appwrite Analytics tells AI traffic apart
AI crawlers, AI assistants, and people clicking links from AI answers are three different kinds of traffic. Learn how Appwrite Analytics tells them apart, shows them on your dashboard, and lets you act on them.

"AI traffic" sounds like one thing, but on a real site it is three very different visits: crawlers scanning your pages, assistants fetching a page live for a user, and real people clicking a link in an AI answer.
Lumping them together breaks your numbers. Crawlers inflate your visitor count, clicks from ChatGPT or Gemini disappear into search or direct traffic, and blocking all AI bots at once can cut off assistants that send readers to your docs.
Three kinds of AI traffic
- AI crawlers scan your pages in the background to train models or build search indexes, such as
GPTBot,ClaudeBot, andPerplexityBot. No person is waiting on the page. - AI assistants fetch a page live while answering someone's prompt, such as
ChatGPT User,Claude User, andPerplexity User. A person asked the question, but the bot reads the page. - AI referrals are real people who click a link in an AI answer (from ChatGPT, Claude, Gemini, Perplexity, Copilot, or DeepSeek) and open your site in their browser.
| Traffic kind | Classified as | Where it appears | API filter |
|---|---|---|---|
| AI crawler | Bot | Humans vs bots, AI agents and crawlers | botCategory = ai crawler |
| AI assistant | Bot | Humans vs bots, AI agents and crawlers | botCategory = ai assistant |
| AI referral | Human | Traffic sources (Channels and Sources) | channel = ai |
How Appwrite Analytics spots AI bots
A bot shows up in Appwrite Analytics when it runs JavaScript and loads your tracker, or when your server forwards events with the visitor's ip and userAgent. Your own test runs stay off the dashboard because the Web SDK skips automated browsers like Playwright, Puppeteer, Selenium, and Cypress using navigator.webdriver.
When an event arrives, Appwrite runs three checks in order and keeps the most specific match:
- User agent: If the
User-Agentheader matches a known bot, Appwrite marks the visit as a bot and records its name (such asGPTBotorChatGPT User) and category (ai crawlerorai assistant). It also leaves browser, OS, and device blank so bots do not skew your desktop stats. Unknown agents with words likebot,crawler, orspiderland in a genericcrawlercategory. - Referrer: If the user agent does not match, Appwrite checks the referring domain (and its parent domains) against known referrer-spam domains and labels matches as
referrer spam. - Network: Headless scrapers often send a normal Chrome user agent. Appwrite checks the network behind the IP address before discarding it. Google's Firebase Test Lab ranges become
test device, and hosting or cloud networks (such as Amazon or DigitalOcean) becomedatacenterwith the provider as the bot name.
Instead of silently dropping bot events, Appwrite flags and stores them. Bot activity stays visible on the dashboard, and selecting Humans hides it.
Keeping real people out of the datacenter bucket
Hosting checks catch headless scrapers, but real people also use VPNs, privacy relays, and corporate proxies. Appwrite handles that in two ways:
- Skip known human networks. Apple iCloud Private Relay, Cloudflare WARP, Fastly, Zscaler, Netskope, and several mobile carriers are not marked as
datacenter. - Count active visitors as human. If a
datacentervisitor takes two or more different interactive actions in the date range (such as a custom event and an outbound click), the dashboard counts them as human. Passive events like pageviews and scroll depth do not count, so a crawler firing one load-time event stays a bot while real VPN users stay human.
Firebase Test Lab stays in its own test device category so Google Play's automated app tests always count as bots, no matter how many screens they tap.
How Appwrite Analytics spots AI referrals
Human visits land in one of seven channels: direct, search, ai, social, email, paid, or referral. Appwrite picks the channel using the landing URL and the referring hostname. It strips a leading www. but keeps subdomains intact so mail.google.com, gemini.google.com, and google.com stay separate. Links from your own domain count as direct.
Paid tags win first: a paid utm_medium (like cpc or display) or an ad click ID (like gclid or msclkid) always lands in paid, even when the referrer is an AI site.
Without a paid tag, Appwrite checks the referring hostname in a strict order:
- Webmail (
email), such asmail.google.comandoutlook.live.com. - AI tools (
ai), such aschatgpt.com,claude.ai,gemini.google.com,perplexity.ai,copilot.microsoft.com, andchat.deepseek.com. - Search engines (
search), such as Google, Bing, DuckDuckGo, and Brave Search. - Social sites (
social), such as X, LinkedIn, Reddit, YouTube, and Hacker News. - Everything else (
referral).
Order matters here. Search matching looks for brand names inside the hostname so regional domains like google.co.uk count as search. Checking AI and webmail before search stops gemini.google.com, edgeservices.bing.com, and mail.google.com from falling into search.
One limit to keep in mind: the ai channel is a minimum, not the full total. Many AI websites strip the Referer header, and desktop or mobile AI apps often send no referrer at all. Those visits still count as human traffic, but they land in direct.
Reading AI traffic on the dashboard and through the API
Three cards on the property dashboard show your AI traffic:
- Traffic sources lists the
aichannel under Channels and specific hosts (such aschatgpt.comorperplexity.ai) under Sources. Selectaito filter the whole dashboard to human visitors from AI answers. - Humans vs bots splits traffic between people and bots, with By type and Top agents rankings underneath. Select Humans or Bots to filter the view. By default, Web properties include bots in headline totals while Mobile properties open with Humans only turned on.
- AI agents and crawlers lists named bots under Agents and their categories under Categories. Select any bot, such as
GPTBotorChatGPT User, to see which pages it reads.
Querying AI traffic from code
listMetrics returns the same numbers to an API key that has the analytics.read scope.
To see which AI crawlers visited in the last 30 days, break down by BotName and filter botCategory to ai crawler:
import { Client, Analytics, AnalyticsDimension, Query } from 'node-appwrite';
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
.setProject('<PROJECT_ID>')
.setKey('<API_KEY>');
const analytics = new Analytics(client);
const crawlers = await analytics.listMetrics({
propertyId: '<PROPERTY_ID>',
dimensions: [AnalyticsDimension.BotName],
dateRange: '30d',
queries: [Query.equal('botCategory', 'ai crawler')],
limit: 10,
});
for (const row of crawlers.metrics) {
console.log(row.value, row.events);
}
Swap ai crawler for ai assistant to see what live assistants fetch instead.
To see which pages human visitors from AI answers read most, break down by Page and filter to channel = ai and trafficType = human:
const aiPages = await analytics.listMetrics({
propertyId: '<PROPERTY_ID>',
dimensions: [AnalyticsDimension.Page],
dateRange: '30d',
queries: [
Query.equal('channel', 'ai'),
Query.equal('trafficType', 'human'),
],
limit: 10,
});
for (const row of aiPages.metrics) {
console.log(row.value, row.visitors);
}
How bot traffic counts toward your plan
Events from datacenter networks and Firebase Test Lab devices do not count toward your monthly analytics limit. Every other accepted event does count, including events labeled as bots only by user agent or referrer, and server-side events that pass an ip override.
Billing checks the network separately from reporting labels because the tracking endpoint is public. Anyone can fake User-Agent: GPTBot, but they cannot fake their incoming IP address. A real crawler on a cloud server still appears as GPTBot on your dashboard and stays unbilled because of its network, while a faked header from a regular connection still counts.
Blocking unwanted bots without hurting AI referrals
Separating crawlers from assistants lets you block a heavy scraper like GPTBot while leaving ChatGPT User, Claude User, and Perplexity User allowed to read your docs and send readers back.
For sites hosted on Appwrite Sites, a Firewall rule starts from the dashboard:
- Find the bot in the AI agents and crawlers card.
- Right-click its name and select Create firewall rule.
- On the Create firewall rule page, the user-agent condition and Deny action are pre-filled.
- If the dashboard name has a space (like
ChatGPT User), change the condition to match its user-agent spelling (likeChatGPT-User). - Check Estimated impact to see how many recent requests the rule matches.
- Switch the action to Challenge if you prefer to verify visitors instead of blocking them, then select Create rule.
Analytics and Firewall counts will not match. Analytics counts events sent by your tracker, while Firewall counts every HTTP request, including assets and crawlers that never run JavaScript.
Conclusion
AI crawlers, AI assistants, and human clicks from AI answers all mean different things for your site. Appwrite Analytics separates them on your dashboard and in the API, so you can keep human numbers clean, see which bots read your pages, and block unwanted crawlers with Firewall.
Have questions or want to share what turned up in your AI traffic? Join us on Discord.
Resources
An AI crawler scans pages in the background to train models or build search indexes (like GPTBot). An AI assistant fetches a page live while answering someone's prompt (like ChatGPT User). An AI referral is a real person who clicked a link inside an AI answer.
No. People who click a link from an AI tool count as human visitors in the ai channel under Traffic sources. Only automated bot fetches appear in the bot cards.
Appwrite checks the network behind the visitor's IP address. Cloud and hosting traffic is labeled as datacenter, unless the network mostly carries real people (like iCloud Private Relay) or the visitor takes two or more different interactive actions.
Many AI websites strip the Referer header, and desktop or mobile AI apps often send no referrer at all. Those visits still count as human traffic, but they land in direct.
Traffic from datacenter networks and Firebase Test Lab devices does not count toward your monthly limit. Events labeled as bots only by user agent or referrer still count, as do server-side events with an ip override.
Yes. On Appwrite Sites, right-click any bot in the AI agents and crawlers card and select Create firewall rule. A rule can block a crawler like GPTBot while assistant bots like ChatGPT User stay allowed.





