Visitor Analytics
The guide's index is at The guide. This page covers all of visitor analytics: what is recorded, what is deliberately not recorded, the three places to read the counts, and how to interpret them.
What counts as a visit
The platform counts one visit for each page it serves for an app. A page is an HTML response with status 200: index.html, a pretty path like /about, or a page rendered by an app's own worker.js. These are not pages and are never counted:
- a stylesheet, a script, an image, a font, a JSON file
- anything under
./api/: a store read, a write, a socket, an upload - a redirect, a refusal, a 404
- the platform's own pages: the space's index, a sign-in, the trash
So the count is the number of times someone opened a page, not the number of requests the app served. A page that fetches its rows twenty times still counts as one visit.
Fields recorded with each visit
Each visit records these six fields and nothing else:
- the app the page belongs to
- the space and the app's slug
- the path that was opened
- the country the request came from, as Cloudflare's two-letter country code
- the hostname of the site that linked to the app, and no other part of the referrer: no path and no query string, so a search term a visitor arrived with is dropped before anything is written
- one label for the kind of client:
browser,bot,agent(an AI assistant fetching the page) orverified(a bot Cloudflare verified, such as a search engine's). A browser asking from an ad network's own network, such as Meta reviewing an ad's landing page, is abot
When the page then runs in a browser, the platform's script woven into it records the visit once more with the label person, from the same six fields. A program that fetches the page without running it never sends that.
What is never recorded
- no IP address, in any form
- no visitor id, no cookie, no session, no fingerprint
- no user-agent string and no network: both are a fingerprint, so only the client label above is derived from them and kept
- nothing that could be joined back to a person, on yaks.app or anywhere else
This is a design choice, not a setting: the data holds no visitor identity, so no query can produce one. If the person asks "who opened it?" or "did Dana see it?", tell them that visitor analytics cannot answer that, by design, rather than looking for another way to find out.
Counts are kept for about three months and then deleted.
People and bots
Every count is split three ways, and a fourth for older visits:
- people: pages that ran in a browser
- likely bots: every other request for a page, including a browser's whose page never ran, a crawler's and an AI assistant's
- verified bots: requests Cloudflare verified as a known bot's
- unknown: a browser's requests from before 12:00 UTC on 2026-11-27, when pages began saying they ran, whose page never said so. Nothing recorded then tells a person from a scraper, so they are neither. They leave a 30-day count by the end of December.
The counts and lists are people's by default. Asked for with bots, they count every request for a page instead, unknown ones included.
Reading visits with app_stats
app_stats(app: 'recipes')
app_stats(app: 'recipes', days: 7)
app_stats(app: 'recipes', bots: true)It returns, for the window of days:
- total visits, people's or with bots, and the split of people, likely bots, verified bots and unknown
- daily: one entry per day, oldest first, including days with no visits
- pages: the most-opened paths
- from: the sites that linked to the app, most visits first
- countries: the visitors' countries
For a published app it also says how many other spaces installed a copy (Installed by 2 other spaces). A space counts once, however many copies it installs.
days defaults to 30 and is capped at 90, which is how far back counts are kept. Only the app's own people may call it: permission to read a public app's pages does not include permission to read its visit counts.
The Visits page and the ./api/stats endpoint
The Visits page in the person's app manager shows each app's total, the split of people and bots, a daily chart, and the same three lists. Its People and With bots tabs choose what is counted.
An app's own page can also read its counts from ./api/stats when the person viewing it is a member:
let seen = await (await fetch('./api/stats')).json()
if (seen.on) show(seen.total, seen.daily)Add ?days=7 for a shorter window, and ?bots to count bots' visits too. When the platform has no analytics reader configured, it returns {on: false} with a message. That is the one case to handle: show the message, and do not treat it as an error. This endpoint returns no per-visitor data either: a member reading it gets the same numbers you get.
Accuracy, sampling and bots
The counts are approximate by design. Under load the counter keeps a sample of visits and records how many visits each kept row represents, and every total in the report is already scaled back up by that number. A large count is a good estimate and a small one is exact. Do not present the counts as an exact record.
People are pages that ran in a browser, so a crawler that only fetches a page is a bot, and so is a scanner that names a browser. A crawler that runs pages in a real browser can still be counted as a person, so treat a small number of people with some caution before telling the person it is an audience.
An app with few visits is not broken. Before building a feature to raise the number, ask the person whether anyone has been given the link. Usually nobody has, and the fix is to share the link, not to add a feature.
When to check visits
- the person asks whether anyone is reading the app
- they ask which page is worth working on, or where their readers come from
- they shared the app somewhere and want to know whether people opened it
Do not check visits on every deploy, and do not report them unasked: a count nobody asked for is noise.
Related pages
- Errors and Rollback — Errors and Rollback: what broke, and rolling back
- Access, Publishing and Installing — Access, Publishing and Installing: who may read an app, and how it is published and installed
- Front Page and Routing — Front Page and Routing: which app answers which address
