Intro
GPTrends’ Bot Analytics beta feature allows you to track and analyze how AI bots, crawlers and agents from leading platforms (OpenAI, Google, Perplexity, and Anthropic) visit and interact with your website.- AI bots regularly visit websites to collect, update, and verify information not only for the training of LLMs, but also to power real-time AI search and live answers.
- This crawling behavior determines which content is available and ingested into AI chat assistants and how your brand and products are represented in AI-generated responses.
- Importantly, AI bots behave differently than the Google web crawler. Most do not run JavaScript or maintain cookies or session state. If your site is JS heavy or not server-side rendered then there’s a risk that your content is not being ingested correctly.
The overall goal of Bot Analytics is to ensure that your most important content & messaging is being discovered and understood by AI platforms.
What’s included in the Beta?
The current version allows you to:- Identify which types AI bots are accessing your site and how often they visit
- See which specific pages are being crawled or overlooked
- Detect patterns, trends, or technical issues that could impact your AI visibility
- Understand how LLMs and AI chatbot apps are building knowledge about your brand, products and services from your website

Implementation
Because most AI bots bypass JavaScript execution, they don’t show up in tools like Google Analytics and must be tracked from the server side. In our Beta, we currently offer 3 forms of integrations:- Server Log Drain (recommended). Integrated directly with your server logs from Vercel (Netlify, GCP and AWS coming soon).
- Next.js SDK. Lightweight, easy to install Next.js JavaScript package.
- HTTP API Endpoint. Send event data manually from any backend via an HTTP POST request.
Installation Steps
Please find platform specific steps below:Vercel
Vercel
1
Add new 'Custom HTTP endpoint' drain
- In Vercel navigate to Project Settings and select Drains.
- Add a new Custom HTTP endpoint drain.

2
Select "Logs" as data to drain

3
Configure the drain
- Drain Name:
GPTrends Bot Analytics
- Projects:
Your website project
- Sources: Select all besides
builds
- Environment:
Production
- Sampling Rate:
100%
4
Set the destination
Add the following POST endpoint URL with your You can find your
GPTrends API Key
appended after ?websiteKey=
GPTrends API Key
in the Bot Analytics section of the platform, either in the set up flow or under “Manage Tracking”5
Select 'Create Drain' to save and finish
Need help? Feel free to grab some time with us here and we’ll be happy to walk you through the set up process
Next.js
Next.js
1
Step 1
Install the GPTrends tracking package:
2
Step 2
Update your
middleware.ts
file:Need help? Feel free to grab some time with us here and we’ll be happy to walk you through the set up process
HTTP API
HTTP API
Track bot visits from any backend with a simple GET request:Required Parameters:Notes:
url
: Full URL accesseduserAgent
: Bot’s User-Agent headerref
: Referrer header (empty if none)ip
: Visitor IPwebsiteKey
: Your GPTrends key
- Only track key pages (blogs, landing pages, robots.txt, sitemap.xml)
- Skip static assets
- Use fire-and-forget requests for zero impact on site speed
- URL-encode all parameters
Need help? Feel free to grab some time with us here and we’ll be happy to walk you through the set up process
Security, Privacy & Performance
- No Personal Identifying Information (PII) from users is stored or logged
- The log drain approach occurs outside of the run path and has no impact on your website performance
- The Next.js package runs in a fire-and-forget mode inside middleware; requests are not awaited, so it has no impact on site performance or page load times.
- All errors are safely caught, logged, and discarded — ensuring your site runs exactly as before, with zero interference to end users
Need help? Feel free to grab some time with us here and we’ll be happy to walk you through the set up process