Analytics for AI agents means dropping the session as your unit of analysis and measuring three things instead: who the agent is acting for, what it was sent to do, and whether it finished. An agent has no scroll depth, no dwell time, no mouse movement and no meaningful bounce rate. It may complete a task in four seconds across forty requests, or pause for six hours and resume. Every metric built on session duration and engagement returns a number for agents, and every one of those numbers is meaningless.
The workable model is person-level event tracking with an explicit actor dimension: humans, agents acting for a human, crawlers acting for nobody. This guide covers where the line falls between the three, which session assumptions break, and what to instrument instead.
Three Populations, One Traffic Log
Your access log contains three fundamentally different kinds of visitor. Most analytics setups treat them as one thing (everyone) or two (humans and bots). Three is the correct number.
The Agent Acting for a Human
Software that fetches your page because a specific identifiable person asked it to. A ChatGPT browsing session where the user asked what the pricing page says. A Claude computer-use session filling in a form. A coding agent reading your API docs to write an integration. A shopping agent comparing your product against three others. A procurement agent pulling your security page.
The Crawler
GPTBot building training data, PerplexityBot maintaining an index, CCBot feeding Common Crawl. No human waiting on the response, no session, no conversion possible. Covered separately in AI crawlers vs AI referrals.
Why Session-Based Analytics Breaks for Agents
The session is a modelling convenience invented for browsers. It bundles requests into a unit on the assumption that one human sat down and did something continuous. Agents violate every part of that.
The Timeout Is Arbitrary in Both Directions
The standard 30-minute inactivity window is calibrated to how long a human leaves a tab open. An agent can fire forty requests in three seconds, reading as one intense session, or finish step one, wait two hours for a human approval, and finish step two, reading as two unrelated sessions from the same visitor. Neither is right. The unit of work is the task, and the task has no relationship to elapsed time.
Engagement Metrics Return Garbage
Bounce rate assumes leaving without interacting means disinterest. An agent that fetches the one page it needed, extracts the answer and leaves has had a completely successful visit and records a 100% bounce. Time on page assumes reading; an agent parses your 4,000-word page in the time it takes to receive it. Scroll depth assumes a viewport, and many agents have none. Pages per session assumes browsing, and an agent navigating by sitemap is executing.
Blend agent traffic into your reporting and the distortion is predictable: bounce rate rises, session duration falls, pages per session moves wherever the dominant agent behaviour pushes it, and someone in a meeting concludes the site got worse.
Identity Falls Apart
Many agents run headless with no cookie persistence, so every request is a new visitor and one agent completing a ten-step task registers as ten unique users. The human who dispatched it is a separate record, or no record at all. The agent’s activity and the human’s activity are two halves of one journey and nothing in a standard analytics stack joins them.
Geography and Device Are Noise
Agents run from datacenter IPs, so your geo report tells you about Ashburn, Virginia and Council Bluffs, Iowa. The user agent may be headless Chrome, a declared agent identifier, or a spoofed desktop browser. Any segment built on device or location absorbs this silently and skews.
Consent Is Undefined
A consent banner asks a legal person for permission. An agent is not one, and will ignore the banner, fail to render it, or click whatever dismisses it fastest. None of those answers mean anything. Analytics that only fires post-consent systematically excludes agent traffic your server is definitely still serving. Our privacy-first analytics guide covers the consent architecture side.
What to Track Instead
Replace the session with three concepts: the principal, the task, and the outcome.
1. Tag Every Event With an Actor
Add one property to every event: actor, with values human, agent, or crawler. Add actor_name for the specific agent where you can identify it. It costs almost nothing and it is the difference between answering any question about agent traffic and answering none.
Do it at ingestion, not in reporting. Classification that exists only as a filter someone remembers to apply gets forgotten in the report that matters.
2. Identify the Principal Where the Agent Declares One
The most valuable agent traffic is authenticated. An agent hitting your API with a user’s token, or an in-product agent inside a logged-in session, tells you exactly which human it works for. Attribute those events to that person, with the actor property marking that a machine performed them. The agent’s work then appears on the human’s timeline, where it belongs, because the human is the one who will renew.
Unauthenticated agent traffic has no principal. Record it as agent traffic with no identity rather than inventing a fake visitor per request.
3. Record Declared Intent
Agents leave intent signals humans do not. Which endpoint it called, which schema it requested. A fetch of /pricing then /security then /docs/api is a procurement evaluation shape; a single product page and stop is a comparison shape. If you serve an llms.txt, an OpenAPI spec or structured data, log which agents pull them and how often. Those requests are a purer intent signal than any human clickstream.
4. Define and Instrument Task Completion
This is the metric that replaces conversion rate for agents. A task is a bounded unit of work with a definable end state. Examples worth instrumenting:
- Information retrieval: the agent reached a page containing the answer and stopped, rather than continuing to search.
- Form completion: first field to successful submit with no validation failure loop.
- Integration: read the docs, then made a correctly formed first API call.
- Handoff: the agent finished and a human arrived on the same page or account shortly after. The highest-value outcome, and almost nobody measures it.
An integration task, instrumented as a funnel
Funnels report viewA failed task shows up as a loop: the agent requesting the same or adjacent pages repeatedly, or hitting a run of 4xx responses. Those loops are the agent equivalent of a rage click and they point at real product problems.
5. Treat Errors and Blocks as Product Metrics
Agents abandon on things humans push through. A JavaScript-only page renders as an empty shell to an agent with no JS runtime. A consent wall with no machine-readable escape blocks the request. A 403 from an over-eager WAF rule kills the task silently, and neither you nor the human who dispatched the agent finds out why.
Track 403 and 429 rates by actor. A rising agent block rate on your pricing page is a revenue problem dressed as a security setting.
Separating the Three Populations
Classification has to be behavioural as well as declarative, because the user agent string is trivially spoofable and plenty of agents do not declare themselves at all.
| Feature | AI agent (acting for a person) | Crawler (acting for a corpus) |
|---|---|---|
| Triggered by | A specific human request, in real time | A schedule or a queue |
| Request pattern | Narrow and goal-directed, a handful of related pages | Broad, sitemap-shaped, breadth-first across the site |
| Repeats over time | Rarely, task is one-off | Yes, on a recrawl cadence |
| Loads page assets | Sometimes, if it renders | Almost never, HTML only |
| Executes JavaScript | Increasingly yes for browser-use agents | Mostly no |
| Follows robots.txt | Often exempt by design, it is a user action | Usually, if well behaved |
| Can lead to a conversion | Yes, directly or via a human handoff | Only indirectly, much later, via a citation |
| Where you should count it | Product analytics, own population | Server log analysis |
Practical Detection Signals
Layer these rather than relying on any single one:
- Declared identity. Named user agents such as
ChatGPT-UserorClaude-Userannounce a user-initiated fetch. Verify against published IP ranges, because the string alone proves nothing. - Asset ratio. A real browser requests dozens of subresources per HTML document. A ratio near 1.0 is machine traffic whatever the user agent claims.
- Beacon presence. HTML served but no analytics event means something fetched the page without running JavaScript.
- Input entropy. Humans generate mouse movement, variable keystroke timing and imperfect scroll. Agents generate perfectly uniform or entirely absent input. The strongest signal available, and it does not require trusting the client.
- Timing. Sub-200ms between navigations, or perfectly regular intervals, is machine pacing.
- Network origin. Datacenter ASN supports a classification, never decides one. Plenty of humans use VPNs.
Hold Each Group as a Population
Once classification exists, materialise it. Populations lets you define each group once as a saved set of people and run every other report against it, so a funnel or a retention curve reads for humans only, agents only, or both, without rebuilding the filter each time. The discipline that matters: headline numbers default to humans only, and agent numbers get read deliberately, side by side.
Agent Metrics That Actually Mean Something
Agent share of requests, by page
Product Usage view| Page | Human requests | Agent requests | Agent share |
|---|---|---|---|
| /docs/api | 2,100 | 3,450 | 62% |
| /pricing | 9,800 | 2,740 | 22% |
| /compare/ga4 | 4,300 | 900 | 17% |
| /security | 610 | 480 | 44% |
| / | 41,000 | 1,200 | 3% |
A short list worth putting on a dashboard, all of which survive the absence of a session:
- Agent share of requests, by page. Which pages the machines care about, as in the table above.
- Task completion rate by task type. Your core agent health metric.
- Agent-to-human handoff rate. Share of agent tasks followed by a human arrival on the same account or page within a short window. The closest thing to an agent conversion rate.
- Block and error rate by actor. Rising numbers mean lost tasks you never saw start.
- Agent-assisted conversions. Human conversions with an agent event earlier on the same person’s timeline. Only measurable if you track at the person level.
- Machine-readability coverage. Share of your important pages that return complete content without JavaScript. An input metric, and the one you can act on most directly.
If you are building an internal agent that consumes your own analytics, our guide to agentic workflows in analytics covers the other direction: agents as consumers of data rather than subjects of it.
How Do You Measure AI Agent Behaviour on a Website?
Stop measuring sessions and start measuring tasks. Tag every event with an actor property (human, agent, crawler) at ingestion, classify with layered behavioural signals rather than the user agent string alone, and attribute authenticated agent activity to the human principal it acts for.
Then define completion for each task type the agent might perform, retrieval, form submission, integration, handoff, and measure the completion rate and error rate for each. Bounce rate, session duration and scroll depth return values for agents, but those values carry no information, so remove them from any report that includes agent traffic.
Key Takeaways
The site that is easy for an agent to read is the site that gets recommended by the model the agent reports back to. Measurement is how you find out which of your pages currently qualify.
One analytics idea a week
Short, specific, written by the team building the product. No digest, no roundup.
Continue Reading
How to Track ChatGPT Traffic: Measuring AI Assistant Referrals
Most of your ChatGPT traffic is sitting in the direct bucket. Here is the detection logic that pulls it back out, and the part of it you will never recover.
Read articleAI Crawlers vs AI Referrals: GPTBot, ClaudeBot and What to Actually Block
Blocking training crawlers is cheap. Blocking retrieval crawlers costs you the citations that send real humans. Most robots.txt files do not tell the two apart.
Read articleAI Agentic Workflows for Analytics: A Practical Guide
An AI agentic workflow is a loop: an agent reads behavioral data, decides something, acts, then checks whether the action worked. This guide covers the four parts of that loop and the guardrails each one needs.
Read article