Skip to content

CrispStats for developers: analytics, vitals and errors in one script

A new site's install status on the demo site, Quillbook, on generated traffic.

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 see real-user performance?

    The vitals module reports LCP, INP, CLS, FCP and TTFB from real visits, following the web-vitals definitions, broken down by page and device.
  • 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 only fetch, 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

  1. 01

    Add the script or SDK

    Turn on vitals and errors with data-vitals and data-errors, or pass the modules to init.
  2. 02

    Exclude yourself

    Run localStorage.crispstats_ignore = 1 in your browser console so your own visits are not counted.
  3. 03

    Send your first custom event

    Call crispstats("signup", { plan: "pro" }), or use a data-cs-event attribute.
  4. 04

    Report AI crawlers

    Add the server helper to your proxy or Worker and hand its promise to waitUntil.
  5. 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

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.