How do I measure what AI agents do on my website?
Agents reach a site in three ways: as a referral (a person sent by ChatGPT or Perplexity), as a fetch (the agent itself loading a page) and as a tool call (the agent operating your MCP or WebMCP tools). Measuring agent behaviour means recording all three, with the agent named, and reading them side by side.
By Gorden Wübbe · Updated 2026-09-08
What counts as agent behaviour
A crawler reading 400 pages overnight, a live assistant fetching three pages in four seconds to answer a question, a person arriving from a chat, and an assistant calling a tool inside the browser are four different behaviours with four different meanings. Ordinary analytics folds the first three into one line labelled Direct or Other and never sees the fourth.
To measure behaviour you need each event with three facts: which agent, which page or tool, and what happened next.
Step 1: one line of script
Add your site in the dashboard and put the snippet on every page. It records the page path (no query string), whether the visit came from or was made by an AI assistant, and every MCP or WebMCP tool registration and call. No cookies, no network address stored.
<script defer data-domain="example.com" src="https://agenttracking.co/agent.js"></script>
Step 2: your server log for crawlers
Most crawlers never run JavaScript, so the snippet cannot see them. Upload your access log on the settings page or send it daily from a cron with the API token. Each line is matched against the agent list and checked against the vendor's published IP ranges; an impostor claiming to be GPTBot from a random address is listed as unverified, not counted.
curl -sS -X POST https://agenttracking.co/api/logs/example.com \ -H "Authorization: Bearer wmt_your_token" \ -H "Content-Type: text/plain" --data-binary @/var/log/nginx/access.log
Step 3: read the four views
Overview shows referrals, fetches, tool calls and conversions per day with the trend against the previous period. Agents lists who sent visitors and who fetched pages, with share, trend, bursts and verification. Tools shows calls, success rate, average duration and top errors per tool. Pages shows what agents fetch and where tools are called.
A burst is one agent fetching several pages within seconds: the footprint of an assistant answering one question about you. Watching which pages a burst takes tells you what the assistant considered relevant.
Step 4: ask instead of browsing
Every number is available as JSON and as an MCP tool. Point Claude, ChatGPT or Cursor at it and ask which agents read your site this week and which tool failed most.
{ "mcpServers": { "agent-tracking": { "url": "https://agenttracking.co/api/mcp",
"headers": { "Authorization": "Bearer wmt_your_token" } } } }In short
Can I measure agents without a script on the page?
Partly. The server log gives you crawler fetches and bursts. Referrals and tool calls happen in the browser and need the snippet.
Does it slow the site down?
The snippet is 4.5 KB, loads deferred and sends small batches with sendBeacon. Nothing blocks rendering.