CrispStats for developers: analytics, vitals and errors in one script
CrispStats is one cookieless script, about 2.2 KB gzipped for the core, that reports traffic, custom events, web vitals and JavaScript errors. Everything it collects is available through a REST API and an MCP server on every plan.
Updated
What you can answer with it
How do I add it to my app?
Use the script tag, or the npm SDK if you bundle your JavaScript. The SDK has a React component and hook, works with the Next.js App Router, is tree-shakeable and does nothing on the server. Single-page navigation through the History API is tracked with no extra code.Can I catch JavaScript errors without another SDK?
The errors module sends uncaught errors and unhandled promise rejections with message, source, line and stack, grouped in the dashboard by the page and browser they hit.Can I query my data from code or an AI assistant?
The REST API is on every plan (10,000 requests a day on Starter, more on larger plans). The MCP server lets Claude, Cursor and other MCP clients answer questions about your numbers.Can I see which AI crawlers hit my pages?
Crawlers do not run JavaScript, so a server helper reports AI crawler hits from your proxy, middleware or Worker. It sends only the user agent, path and status, and skips anything that is not a known AI crawler.Can I send events from the backend?
A server helper sends custom events and revenue from webhooks, crons and jobs with a secret key, using onlyfetch, so it runs on Node, Workers, Deno and Bun.
Figures in the cells come from the demo site, Quillbook, on generated traffic.
What it does not do
Said plainly, so you can plan around it.
Not included
CrispStats is not open source and cannot be self-hosted.
There are no mobile SDKs: the SDK targets the browser and server JavaScript.
Error tracking covers JavaScript errors in the browser, not exceptions on your server.
There is no session replay.
Features worth a look
Every feature is on every plan and in the free trial.
Web vitals
LCP, INP and CLS measured on real visits, by page and device.Error tracking
JavaScript errors grouped with the page and browser they hit.Ask AI
Ask about your numbers in plain words, in the app or over MCP.AI traffic
Visitors sent by ChatGPT, Perplexity and Claude, plus AI crawler hits.Uptime
Checks from outside your stack, with alerts and a status page.
Figures on the cards come from the demo site, Quillbook, on generated traffic.
Your first week
- 01
Add the script or SDK
Turn on vitals and errors withdata-vitalsanddata-errors, or pass the modules toinit. - 02
Exclude yourself
RunlocalStorage.crispstats_ignore = 1in your browser console so your own visits are not counted. - 03
Send your first custom event
Callcrispstats("signup", { plan: "pro" }), or use adata-cs-eventattribute. - 04
Report AI crawlers
Add the server helper to your proxy or Worker and hand its promise towaitUntil. - 05
Create an API key
Pull stats into your own tools, or connect the MCP server to your editor.
Team questions. Straight answers.
What people in this seat ask before they add the script.
The core is about 2.2 KB gzipped and the build with every optional module is about 3.8 KB. The build fails if either goes over its budget.
No. The script sets no cookies and writes nothing to the device by default. Visitors are recognised for one day through a hash the collector rotates daily.
Yes. Set the data-api attribute on the script tag to a path on your own domain, such as /stats, and forward that path to the collector.
Not answered here? Write to hello@crispstats.com
Read more
Guides
- How to improve Core Web Vitals: the fixes that move LCP, INP and CLS
How to improve Core Web Vitals metric by metric, from Google's web.dev guidance: what to fix first for LCP, INP and CLS, with a worked LCP breakdown.
- How to reduce bounce rate: find the cause, then fix it
How to improve bounce rate by cause: slow first screens, a mismatch with the link, no next step, errors and tracking gaps.
- Core Web Vitals in plain English: LCP, INP and CLS
What LCP, INP and CLS measure, the good and poor thresholds for each, why the 75th percentile matters, and the fixes that usually move them.
Your traffic, crisp and clear
Start a 14-day free trial with every feature and no card, or see the dashboard on sample data first. CrispStats plans and limits are on the pricing page.