If your site is hosted on Netlify, a log drain can send your traffic logs to your project by itself. Nothing is installed on the site. The visits show on the AI crawlers page.
Only AI crawler requests are kept. Requests from people and from other bots are dropped when they arrive. No IP address, no user agent, no query string and no referrer is stored.
What you need
- A Netlify team on a plan that includes log drains. Check with Netlify which plans do: set-up guides for this feature say Enterprise.
- A workspace Admin to make the token in Settings.
If you can't use log drains, you can export traffic logs from Netlify and upload the file on the AI crawlers page instead. See Upload logs from CloudFront, Fastly, Vercel or Netlify.
Set it up
- Open Settings, find Netlify log connection and choose Generate token. Copy the token and the address. The token is shown once.
- In Netlify, open Logs & Metrics, find Log Drains and add a log drain of type General HTTP endpoint. Where this sits in Netlify's menus can differ between accounts.
- Choose traffic logs only. Untick function logs, edge function logs, deploy logs and WAF logs.
- Leave Exclude personally identifiable information unticked. With it ticked Netlify leaves the user agent out, and then no AI crawler can be told apart from anyone else.
- Fill in:
- Endpoint URL: the address from Settings.
- Authorization header:
Bearer, a space, then your token. - Log drain format: JSON.
- Save the drain. Netlify checks it when you save, and we answer that check once the token is right. Visits appear on the AI crawlers page within a few minutes of an AI crawler fetching a page. Last batch received in Settings shows the newest.
The fields we read from each traffic log are timestamp, url, status_code and user_agent. We never read client_ip, the query string or the referrer.
If nothing shows
- Saving the drain fails: the token is wrong or was replaced, or the Netlify log connection is not switched on for your workspace yet. Generate a new token in Settings and check the header reads
Bearer, a space and the token, with no quotes. - No visits at all: check the drain is enabled and that traffic logs are included. A drain set up on one team covers every site of that team, but only requests for your project's own website are kept.
- Rows arrive without a user agent: untick Exclude personally identifiable information in the drain.
- Visits missing for one host: check the website in Settings matches the host your site is served on.
- Counts seem low: only visits from the AI crawlers we list are counted. Rows left out so far in Settings says how many were not.