Track AI Crawlers on Your Site with Upstash Agent Analytics
Blog post from Upstash
Upstash Agent Analytics is an open-source library designed to track visits from AI agents like ChatGPT, Claude, Perplexity, Gemini, and Copilot to websites built with Next.js. By reading user-agent and referer headers, it identifies and logs visits from these AI agents, while excluding regular browser traffic to ensure no personal identifiable information (PII) is stored. The library is easy to integrate into Next.js applications with minimal code, using Redis to store data where each provider-and-path pair is tracked via a Redis hash with a default TTL of 28 days. Users can query the data through a dashboard or a query API that uses Redis Search, enabling aggregation and timeseries analysis of AI agent visits over specified time windows. The library is open-source under the MIT license and available in the upstash/agent-analytics repository.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| AI Coding Assistant | 3 | 1,586 | 431 | 148 | -12% |
| AI Agents | 1 | 4,874 | 1,103 | 240 | -1% |