Privacy-first analytics your agents can read.
Cookieless web analytics with a script under 1 KB. Ask Claude or ChatGPT how your site is doing and get a chart back. It is open source and runs on Cloudflare.
$ npm install @pageflock/analytics
| Period | Visitors | Yesterday |
|---|---|---|
| 17:00 | – | 54 |
| 18:00 | – | 48 |
| 19:00 | – | 41 |
| 20:00 | – | 36 |
| 21:00 | – | 30 |
| 22:00 | – | 22 |
| 23:00 | – | 15 |
| 00:00 | – | 11 |
| 01:00 | – | 9 |
| 02:00 | – | 8 |
| 03:00 | – | 10 |
| 04:00 | – | 16 |
| 05:00 | – | 29 |
| 06:00 | – | 47 |
| 07:00 | – | 63 |
| 08:00 | – | 72 |
| 09:00 | – | 78 |
| 10:00 | – | 81 |
| 11:00 | – | 77 |
| 12:00 | – | 75 |
| 13:00 | – | 73 |
| 14:00 | – | 70 |
| 15:00 | – | 68 |
| 16:00 | – | 64 |
Why did visitors jump at 13:00?
query_stats sources, pages since 13:00
Ask your agent how the launch went
Ask in the chat you already have open. The answers use the same numbers as the dashboard.
Charts in the conversation
Connect the MCP server to Claude or ChatGPT, ask how last week went, and the answer comes with an interactive chart.
Installed by your agent
Paste one prompt into Claude Code or Cursor. It installs the package your framework needs, and the dashboard tells you when the first visit arrives.
Typed tools, real links
Every tool declares its output schema and links to the matching dashboard view. The REST API runs the same operations.
Know your traffic, keep their privacy
Pageflock counts visits without identifying anyone. It keeps no personal data, so there is nothing about your visitors to leak or delete.
Nothing on the device
Pageflock sets no cookies, writes nothing to localStorage and does no fingerprinting. With nothing stored on your visitors' devices, you don't need a consent banner.
No personal data kept
IP addresses and user agents are never stored or logged. A visitor is a hash with a salt that changes every day, so a visit today can't be linked to one tomorrow.
Under 1 KB
The script is under 1 KB gzipped, with no dependencies. It counts page views, custom events, time on page and scroll depth.
One component, or one script tag
@pageflock/analytics works with Next.js, React, Vue, SvelteKit and Astro, and counts client navigations as page views. Other sites add one line of HTML.
import { Analytics } from "@pageflock/analytics/next";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Analytics site="SITE_ID" />
</body>
</html>
);
}Open source, self-host first
Use the hosted version or run it on your own Cloudflare account. Both run the same code.
Open source
The app is AGPL-3.0, the tracking script and SDK are MIT. Read the code or send a pull request.
Runs on Cloudflare
Two Workers, D1 and Durable Objects on your own Cloudflare account. Setting it up takes a few commands and a GitHub Action.
Workspaces and sharing
Invite your team to a workspace, share a dashboard by link or make it public, and give each workspace its own API keys.