Visitors, see which AI agents read your site and who visits it
One script tag plus a server snippet (or a host connector) show how often ChatGPT, Claude and Perplexity read your site, what each was sent, which AI answers send people to you, and, if you turn it on, which companies visit.
Visitors shows who reads your site. It lives under Tools in the web app, and it's the product behind lettervisit.com.
It answers four questions:
- Which AI agents read your site? How often ChatGPT, Claude, Perplexity and the search crawlers fetch your pages, which pages, and why they came. Free.
- What were they sent? Whether each agent got Markdown or HTML, and how many requests your site or firewall refused. Free.
- Which AI answers send people to you? Visits from a link in a ChatGPT, Claude, Perplexity, Gemini or Copilot answer. Free.
- Which companies visit? De-anonymization identifies the companies and people behind visits. Off until you turn it on. 50 tokens per person identified.
Everything is private to you.
Why a script tag isn't enough
AI agents read your page's HTML and leave. They never run JavaScript, so any JavaScript tag (ours, PostHog, Google Analytics) misses them. Only your server, or your host, sees them. That's why Visitors has two parts:
- The script tag runs in people's browsers. It counts visits from AI answers and, with de-anonymization on, who visits.
- The server snippet, or a host connector, sees every request your site serves, including the ones from AI agents.
Setting up
Open Visitors. Until something is installed it opens on Setup. You install one thing, the script, then choose what it tracks.
Install the script. If you haven't added your site yet, the panel first asks for your website, then shows the install.
- Let Letter open a pull request for you. With the repository that builds your site connected, one pull request adds the script tag and, while AI agents is on, the server snippet for your stack (it replaces an older snippet if you have one). Its progress shows as steps that turn green (Writing, PR open, Merging, Merged, Live on your site), and the panel's badge follows it: Writing the pull request, Pull request open, Merging, Deploying, then Live. Nothing merges until you do.
- Add it yourself. Under the pull request, Add it yourself opens the script tag: paste it into the
<head>of every page, once. It starts open when no repository is connected.
Either way, the badge turns Live as soon as the script loads on your live site, with today's visits beside it once people are counted (for example Live · 42 visits today). Once it's live, the panel shows only your script tag. Don't put the tag behind your cookie banner or limit it to production: it also runs your A/B tests, which have to work for every visitor. If your site has a cookie banner, see Cookie banners.
Choose what to track. Under the install, one switch each, on or off at any time:
- AI agents (on by default, free). ChatGPT, Claude and other bots read your pages without loading the script tag, so only your server or your host sees them. While the switch is on, a badge under it says where that stands: Not live yet, the pull request's step, then Live (with today's agent visits). Once the script is live and agents aren't counted yet, a pull request button under the switch adds the server snippet on its own, and Add it yourself holds the server snippet for your stack (Next.js; Vercel, for a site on Vercel that isn't Next.js, such as Vite, Astro or plain HTML; Netlify, static sites included; Cloudflare; Express; or Other) and Connect Vercel / Connect Cloudflare. After you deploy, Send a test visit sends one request as an AI crawler, and the badge turns Live on the first request your server forwards. You can also run the test from a terminal with the command under it. Turned off, nothing is counted and an install pull request adds the script tag alone.
- De-anonymization (off until you turn it on, 50 tokens per person identified). It needs only the script. See De-anonymization.
- Letter Edit (⌘L in Chrome, Ctrl+L in Safari, on any page of your site, for your team only: open your site once from Letter and ⌘L works there in that browser).
Until AI agents are counted, the AI agents tab says AI agents aren't tracked yet, and Set up AI agents opens Setup.
Each code block has Copy code for the code and Copy AI prompt for the same step written for a coding agent (Claude Code, Cursor).
Install once
You install the server snippet once. What it sends is fixed, and which requests it sends is decided on our side and updates on its own, so improvements to Visitors never ask you to change your code.
The snippet never slows your pages down: it reports in the background and your visitors never wait for it.
Or connect your host instead of the server snippet
If your site runs on Vercel or behind Cloudflare, your host can send us its request logs instead of the server snippet. It replaces the server snippet, not the script tag: you still need the tag to count people. In Setup, under the AI agents switch, open Add it yourself, choose Connect Vercel or Connect Cloudflare, and follow the steps it shows.
- Vercel: a log drain. Needs a Vercel Pro or Enterprise plan.
- Cloudflare: a Logpush job. Needs a Cloudflare Enterprise plan.
A host connector sees requests your firewall blocked and pages served from your CDN's cache, which code on your server can't. You can use it beside the snippet.
Sites on Netlify
Netlify has no host connector, but you don't need one. Netlify runs Edge Functions on every request, including on a static site, so the Netlify tab gives you the server snippet as netlify/edge-functions/letter.ts. Add the file and deploy as usual. The install pull request adds it for you when your repository has a netlify.toml.
Sites on a site builder
The script tag works on every site builder through its custom code settings. The server snippet needs somewhere to run in front of your site:
- Webflow: use Cloudflare Orange-to-Orange (O2O), Webflow's supported way to put Cloudflare in front of a Webflow site. It works on any Cloudflare plan, including Free. Then use the Cloudflare tab and add the Worker route for your domain.
- Framer: Framer documents a Cloudflare proxy setup on its higher plans. Follow it, then use the Cloudflare tab.
- Squarespace and Wix: neither supports a Cloudflare proxy today, so ChatGPT and Claude visits can't be counted on these sites yet.
AI agents
The AI agents tab shows visits per day, each agent and why it came. Choose 7, 30 or 90 days.
- Why it came: answering a person (an assistant fetched the page because someone asked it something just then), building a search index, or collecting training data. AI companies use a different agent for each, so the agent's name tells us which.
- Verified: the request came from an address the agent's company publishes, passed the company's own DNS check, or carried its signature. Some companies (for example Meta and Exa) publish nothing to check against, so their visits can never be verified. That doesn't mean they're fake.
Paths agents read lists every path agents requested, not just the busiest, sorted into pages, agent files (llms.txt, agents.md and .md copies of your pages), site files (robots.txt, sitemaps) and assets. Search it, or show up to 500.
Markdown or HTML splits the requests per agent into what was sent and what was asked for. Sent is read from your site's response, which Visitors sees with the Cloudflare Worker, Express or Node snippet, or a Cloudflare Logpush connector. Asked for is what the agent requested, which is all the Next.js and Vercel snippets can see, since they run before the page is sent. If your site answers the same address with either format depending on what the agent asks for, asked for is what it got; if it doesn't, it may have sent HTML whatever was asked. The panel also counts the requests your site or firewall refused.
Pages
The Pages tab shows each page with the people who loaded it and the AI agents that requested it. People are counted once de-anonymization is on; until then the tab lists AI agents per page on their own.
Citations
The Citations tab counts visits from AI answers: how many, from which assistant, and which pages they landed on. One person who lands twice counts twice. The script tag records this on its own, with no cookies and no personal data, only where the visit came from and the page it landed on. Days before your script was first seen aren't drawn as zero.
Every number is a floor
Each number counts things that really happened, but some things can't be seen from your site at all, so each one can only be too low. The line under each number says what it can't see. For example:
- An AI assistant often answers from its search index without fetching your page again, and that leaves nothing on your server.
- A click from Google's AI Overviews looks like any other Google search visit.
- A visitor with an ad blocker stops the script, and on a site with a cookie banner, one who hasn't accepted isn't counted among people.
When your server also counts visits from AI answers, the line tells you how many it saw against how many the script counted.
What we collect
- The page, the agent's name, and its address. The address is used to verify the agent and isn't stored.
- What your site sent back (its type and status), and where a visit came from (
utm_*andrefin the address). - Never cookies, passwords or login tokens, and no other part of the address.
De-anonymization
De-anonymization shows which companies and people visit your site. Turn it on with Turn on on the installed card in Letterpress, in the last setup step, on the People tab or in Setup. (The tab once called De-anonymization is People; the switch keeps the name De-anonymization.)
- It's off until someone on your team turns it on. Copy Privacy Policy Edit (GDPR) gives you a line for your privacy policy.
- It runs on the same script tag. There's nothing else to install.
- Before it turns on, we confirm the site is yours by finding your own key on your homepage, in the script tag or in the code that loads it. If you add the tag through a tag manager, that check can't see it.
- Each person identified costs 50 tokens, once, however often they come back. Accounts that signed up through Investor Watch get identification free, up to 500 people a month.
- Identified visitors are copied into Letter on a schedule, so the tab opens without waiting.
Cookie banners
The script tag loads for every visitor. Two things wait for the visitor's consent: identifying them, and anything Letter keeps in their browser. Until a visitor accepts, A/B tests still run (they may see a different version on each page), and visits from AI answers are still counted.
-
Cookiebot, OneTrust, or a banner that uses Google consent mode: nothing to do. Letter reads your banner itself.
-
Any other banner: the install pull request connects it for you. By hand, add this line once, directly before the script tag:
<script> window.lettervisit = window.lettervisit || function () { (window.lettervisit.q = window.lettervisit.q || []).push(arguments); }; window.lettervisit("consent", "denied"); </script>Then, where your site turns on its other analytics after consent, also call
window.lettervisit("consent", "granted"): when the visitor accepts, and on every later page where they already have. -
No banner: visitors in the EU, the UK and Switzerland aren't identified. Elsewhere they are, so mention it in your privacy policy. Setup gives you a line to copy.
A browser that sends Global Privacy Control is never identified. Setup shows which of these applies to your site.
What Letter keeps in the browser
The script sets no cookies of its own. Once a visitor accepts, it keeps these entries in the browser's storage, where <key> is your site's lv_pub_ key:
| Name | Storage | What it holds | How long |
|---|---|---|---|
lv:vid:<key> | Local storage | A random ID for this browser on your site | Until cleared |
lv:vx:<key>, lv:vp:<key>, lv:va:<key> | Local storage | Your running A/B tests, the pages they run on, and the version this browser was shown | Until cleared |
lv:rp:<key> | Session storage | Session replay, before it is sent | Until the tab closes |
lv:seen:<key> | Local storage | Written only by install tags added before November 6, 2026 | Until cleared |
When a visitor declines, the script removes all of these itself. It then keeps one entry, lv:no:<key> in local storage, so later pages remember the no.
- Your team: after signing in to Letter Edit (⌘L), a team member's browser also keeps entries starting with
letter-editor. Visitors never get them. - De-anonymization: when it's on, identifying visitors adds its own cookies and browser storage, some lasting up to 400 days. Ask us for the current list for your cookie notice.
From your agent, the CLI, or the API
Everything in the tool is also a tool call, a command, and an endpoint, so the agent you already work with can answer questions about the agents visiting you, including which ones got Markdown.
-
MCP: connect Claude, ChatGPT or any MCP client to
https://lettervisit.com/mcp. It lists only the Visitors tools. -
CLI: for example:
npx letterstory/letterstory visits --agent claude --since 7d npx letterstory/letterstory visits --kind agent_file --since 7d npx letterstory/letterstory visits citations npx letterstory/letterstory visits compare chatgpt claude npx letterstory/letterstory visits connect vercel npx letterstory/letterstory visits export --format csv -
API: the same tools over HTTP. Your API key needs the
visitors:readcapability, andvisitors:writefor the few that change a site. See MCP, the CLI and HTTP.
Turning things off
- Remove the script tag and the server snippet to stop collection.
- Turn AI agents off in Setup to stop counting them; the server snippet then forwards nothing.
- Disconnect a host in Setup under the AI agents switch, and remove the log drain or Logpush job in your host.
- Turn de-anonymization off in Setup at any time.