# CrispStats > Documentation for CrispStats, privacy-first web analytics without cookies: install the script, track events and revenue, read your dashboard and use the REST API and MCP server. > ## Agent Instructions > CrispStats is a hosted, privacy-first web analytics product. It has no self-hosted edition, no session replay, no heatmaps, no A/B testing, no mobile SDKs and no data import except a site's history from a Plausible export (Settings, Import and export). > The script global is crispstats(...), site keys start with cs_pk_ and secret API keys start with cs_sk_. The script is served from https://in.crispstats.com/d.js and the REST API lives at https://crispstats.com/api/v1. > There is no npm package to install. Integrations copy the script tag, the queue stub, crispstats.d.ts and proxy code from these docs or from Settings, Tracking code in the dashboard. A first-party proxy forwards one path of the site to https://in.crispstats.com/p/ and forwards only content-type, user-agent, accept-language, referer, origin, if-none-match and x-forwarded-for, never cookies. - [CrispStats: privacy-first web analytics without cookies](https://docs.crispstats.com/index.md): CrispStats is hosted web analytics with no cookies and no stored IP addresses. Install one script, then track events, revenue, web vitals, errors and uptime. - [Get started with CrispStats in five minutes](https://docs.crispstats.com/quickstart.md): Learn how to add a site to CrispStats, install the tracking script, confirm the first visit and send your first custom event in about five minutes. - [How CrispStats collects and reports data](https://docs.crispstats.com/concepts/how-crispstats-works.md): Follow an event from the CrispStats script to the collector, the live view and your reports, and learn how visitors, sessions and presence are counted. - [Metrics and traffic channels explained](https://docs.crispstats.com/concepts/metrics.md): How CrispStats calculates visitors, sessions, bounce rate, visit duration, conversion rate and revenue per visitor, and how it sorts traffic into channels. - [Install the CrispStats script on any site](https://docs.crispstats.com/install/overview.md): Install CrispStats with one script tag: find your public key, copy the exact code for your platform from the dashboard, and open the guide for your stack. - [Install CrispStats with an AI coding agent](https://docs.crispstats.com/install/ai-agents.md): Hand the CrispStats install to Claude Code, Cursor, Codex or another coding agent: one prompt written for your site, a plain-text install guide the agent reads, and MCP tools that let it check its own work. - [Install CrispStats on a plain HTML site](https://docs.crispstats.com/install/html.md): Add the CrispStats script tag to the head of every page of a static or server-rendered HTML site, turn on optional modules and confirm the install. - [Install CrispStats with Google Tag Manager](https://docs.crispstats.com/install/google-tag-manager.md): Load the CrispStats script through a Google Tag Manager Custom HTML tag that fires on All Pages, using the snippet generated in your site settings. - [Install CrispStats on WordPress](https://docs.crispstats.com/install/wordpress.md): Add the CrispStats script to every WordPress page with a wp_head action, either in your theme's functions.php or in a small site plugin of your own. - [Install CrispStats on Webflow](https://docs.crispstats.com/install/webflow.md): Add the CrispStats script to a Webflow site by pasting the tag into Site settings, Custom code, Head code, then publishing the site to apply it. - [Install CrispStats on Framer](https://docs.crispstats.com/install/framer.md): Add the CrispStats script to a Framer site by pasting the tag into Site settings, General, Custom code, End of head tag, then publishing your site. - [Install CrispStats on Shopify](https://docs.crispstats.com/install/shopify.md): Add the CrispStats script to a Shopify store by pasting the tag above in layout/theme.liquid, then connect the store to record its orders as revenue. - [Install CrispStats on Wix](https://docs.crispstats.com/install/wix.md): Add the CrispStats script to a Wix site with Settings, Custom Code: paste the tag, load it on all pages in the head. Needs a published site with a connected domain. - [Install CrispStats on Squarespace](https://docs.crispstats.com/install/squarespace.md): Add the CrispStats script to a Squarespace site through the Code Injection panel's Header field. Code injection is on the Core, Plus and Advanced plans. - [Install CrispStats on Ghost](https://docs.crispstats.com/install/ghost.md): Add the CrispStats script to a Ghost publication with Settings, Advanced, Code injection: paste the tag into Site header and save. No theme edit needed. - [Add CrispStats to a Next.js app](https://docs.crispstats.com/install/nextjs.md): Add the CrispStats script to a Next.js app with one next/script element, type the global, proxy it through a route handler, mark 404 pages and report AI crawlers from proxy.ts. - [Add CrispStats to a React or Vite app](https://docs.crispstats.com/install/react-vite.md): Install CrispStats in a React or Vite app with one tag in index.html. React Router and TanStack Router need no wiring; hash routers need data-hash. - [Add CrispStats to a Vue or Nuxt app](https://docs.crispstats.com/install/vue-nuxt.md): Install CrispStats in a Nuxt app through app.head.script in nuxt.config.ts, or in a plain Vue app through index.html. Vue Router navigation is tracked for you. - [Add CrispStats to an Astro site](https://docs.crispstats.com/install/astro.md): Install CrispStats in an Astro site with one is:inline script tag in your layout. Static pages and view transitions are both counted as pageviews. - [Add CrispStats to a SvelteKit app](https://docs.crispstats.com/install/sveltekit.md): Install CrispStats in a SvelteKit app with one script tag in src/app.html. Client-side routing is tracked automatically, with no hooks or afterNavigate code. - [Add CrispStats to Remix or React Router](https://docs.crispstats.com/install/remix.md): Install CrispStats in a Remix or React Router framework app by adding the script tag to the Layout export in app/root.tsx. Route changes are tracked for you. - [Add CrispStats to an Angular app](https://docs.crispstats.com/install/angular.md): Install CrispStats in an Angular app with one script tag in src/index.html. Router navigation is tracked for you; hash location needs data-hash. - [Add CrispStats to a Svelte app](https://docs.crispstats.com/install/svelte.md): Install CrispStats in a Svelte app built with Vite by adding the script tag to index.html. Client routers are tracked for you; hash routers need data-hash. - [Use CrispStats from TypeScript](https://docs.crispstats.com/install/typescript.md): Type window.crispstats with a small declaration file, queue calls made before the script loads with a strict TypeScript stub, and call it safely from React, Vue or Svelte code. - [Add CrispStats to a Gatsby site](https://docs.crispstats.com/install/gatsby.md): Install CrispStats on a Gatsby site by adding the script tag with onRenderBody in gatsby-ssr.js. Page changes made by Gatsby's router are tracked for you. - [Add CrispStats to a Hugo site](https://docs.crispstats.com/install/hugo.md): Install CrispStats on a Hugo site by adding the script tag to the head partial or base template that every page uses, then rebuild and deploy. - [Add CrispStats to a Jekyll site](https://docs.crispstats.com/install/jekyll.md): Install CrispStats on a Jekyll site by adding the script tag to the head include or default layout, overriding the theme's file in your own _includes folder. - [Add CrispStats to an Eleventy site](https://docs.crispstats.com/install/eleventy.md): Install CrispStats on an Eleventy (11ty) site by adding the script tag to the base layout in your _includes folder that every page uses. - [Add CrispStats to a Docusaurus site](https://docs.crispstats.com/install/docusaurus.md): Install CrispStats on a Docusaurus docs site with one entry in the scripts array of docusaurus.config.js. Page changes in the browser are tracked for you. - [Add CrispStats to a Laravel app](https://docs.crispstats.com/install/laravel.md): Install CrispStats in a Laravel app by adding the script tag to the head of your Blade layout, then send server-side events from your app with a secret key. - [Add CrispStats to a Ruby on Rails app](https://docs.crispstats.com/install/rails.md): Install CrispStats in a Rails app by adding the script tag to app/views/layouts/application.html.erb. Turbo Drive page changes are tracked for you. - [Add CrispStats to a Django site](https://docs.crispstats.com/install/django.md): Install CrispStats in a Django project by adding the script tag to the head of base.html, the template your pages extend, then send server-side events. - [Add CrispStats to a Flask app](https://docs.crispstats.com/install/flask.md): Install CrispStats in a Flask app by adding the script tag to the head block of your base Jinja template, then send server-side events with Python. - [Switch from Google Analytics 4 to CrispStats](https://docs.crispstats.com/switch/google-analytics.md): Move from Google Analytics 4 to CrispStats: run both side by side, map gtag events, key events and channels, and know what does not carry over. - [Switch from Plausible to CrispStats](https://docs.crispstats.com/switch/plausible.md): Move from Plausible to CrispStats: import your Plausible history, run both scripts side by side, map plausible() calls, CSS class events and goals, and see what does not carry over. - [Import your Plausible history into CrispStats](https://docs.crispstats.com/switch/import-from-plausible.md): Bring your Plausible history into CrispStats from Plausible's export: where to get the file, what comes across and what does not, how the seam works, the limits, and how to remove it. - [Switch from Umami to CrispStats](https://docs.crispstats.com/switch/umami.md): Move from Umami to CrispStats: run both scripts side by side, map umami.track, data-umami-event attributes and identify, and see what does not carry over. - [Switch from Fathom to CrispStats](https://docs.crispstats.com/switch/fathom.md): Move from Fathom Analytics to CrispStats: run both side by side, map fathom.trackEvent calls and event values, and see what does not carry over. - [Script attributes reference for d.js](https://docs.crispstats.com/tracking/script-attributes.md): Every data- attribute the CrispStats script reads, with values and defaults, what the script sends and cuts from URLs, and the crispstats global with its queue stub. - [Track single-page apps and hash routing](https://docs.crispstats.com/tracking/single-page-apps.md): How CrispStats sees route changes in single-page apps: the History API, the Navigation API, routers that saved pushState early, hash routing, crispstats.pageview() and data-manual. - [Exclude pages, hosts, IP addresses and your own visits](https://docs.crispstats.com/tracking/exclude-traffic.md): Keep admin pages, staging copies, office IP addresses and your own browser out of CrispStats, with script attributes or with the exclusion settings on the collector. - [Test tracking on localhost, in CI and on staging](https://docs.crispstats.com/tracking/localhost-and-testing.md): Why CrispStats ignores localhost and automated browsers, how data-debug shows every event in the console, how to assert on it in Playwright, and how to send real events from a local build. - [Proxy the CrispStats script through your own domain](https://docs.crispstats.com/tracking/proxy.md): Serve the CrispStats script and collector from a path on your own domain with one forwarding rule for Next.js, Cloudflare, Vercel, Netlify or nginx, and check that it works. - [Proxy CrispStats through a Next.js route handler](https://docs.crispstats.com/tracking/proxy/nextjs.md): Serve the CrispStats script and events from your own domain in a Next.js app with one route handler. Works on Vercel, Node and Cloudflare (OpenNext, vinext). - [Proxy CrispStats on Vercel with vercel.json](https://docs.crispstats.com/tracking/proxy/vercel.md): Serve the CrispStats script and events from your own domain on Vercel with one route in vercel.json that strips cookies and authorization before forwarding. - [Proxy CrispStats on Netlify with an edge function](https://docs.crispstats.com/tracking/proxy/netlify.md): Serve the CrispStats script and events from your own domain on Netlify with one edge function that forwards only safe headers, the visitor address and location. - [Proxy CrispStats with a Cloudflare Worker](https://docs.crispstats.com/tracking/proxy/cloudflare.md): Serve the CrispStats script and events from your own domain with a Cloudflare Worker on one route. It passes the visitor's address and location and caches the script. - [Proxy CrispStats with nginx](https://docs.crispstats.com/tracking/proxy/nginx.md): Serve the CrispStats script and events from your own domain with one nginx location block that forwards only safe headers and the visitor's address. - [Proxy CrispStats with Caddy](https://docs.crispstats.com/tracking/proxy/caddy.md): Serve the CrispStats script and events from your own domain with Caddy: one handle_path block that rewrites to /p and strips cookies and authorization. - [Script files, builds and caching](https://docs.crispstats.com/tracking/script-builds.md): Which CrispStats script file is which (/d.js, /js/script.js, /p/*.js, d.core.js), the two event endpoints, and how the script is cached, versioned and kept from breaking your page. - [Send custom events with crispstats()](https://docs.crispstats.com/track/custom-events.md): Track signups, checkouts and other actions with crispstats(name, props) in the browser or one POST from your server. Covers prop rules, limits, the queue stub and where events show. - [Track clicks with data-cs-event attributes](https://docs.crispstats.com/track/declarative-events.md): Send a CrispStats custom event when someone clicks an element by adding data-cs-event and data-cs-prop-* attributes in HTML, without writing any JavaScript. - [Identify signed-in users](https://docs.crispstats.com/track/identify-users.md): Tie a visitor to your own user id with crispstats.identify(userId, traits) so their visits, events and traits appear on one identified profile in CrispStats. - [Track outbound links and file downloads](https://docs.crispstats.com/track/outbound-links-and-downloads.md): Turn on data-outbound and data-downloads to record clicks on external links and file links as Outbound link and File download events, and see what their url prop contains. - [Track 404 pages](https://docs.crispstats.com/track/404-pages.md): Record visits to not-found pages as one 404 event per view with the path, using data-404 with a meta tag, a CSS selector or the page's HTTP status, so you can fix broken links. - [Send events from your server](https://docs.crispstats.com/track/server-side-events.md): Send CrispStats custom events, revenue and identify calls from a webhook, cron or background job with one POST to the collector and a secret cs_sk_ key. Payload, curl and status codes. - [How revenue attribution works in CrispStats](https://docs.crispstats.com/revenue/overview.md): How CrispStats ties each payment to the visitor id passed at checkout, credits the first visit's source, and what the Revenue screen shows. - [Pass the CrispStats visitor id to your checkout](https://docs.crispstats.com/revenue/visitor-id-at-checkout.md): Get the anonymous visitor id with crispstats.id(), also behind a proxy and in a single-page app, and send it with your checkout as crispstats_visitor_id so CrispStats can attribute the payment. - [Connect Stripe revenue to CrispStats](https://docs.crispstats.com/revenue/stripe.md): Connect Stripe with a restricted key: CrispStats creates its webhook, imports every past payment and ties each sale to the visit that led to it through the Checkout Session metadata. - [Connect Polar revenue to CrispStats](https://docs.crispstats.com/revenue/polar.md): Connect Polar with an organization access token: CrispStats creates its webhook, imports past orders and refunds, and ties each order to a visit through the checkout metadata. - [Connect Paddle revenue to CrispStats](https://docs.crispstats.com/revenue/paddle.md): Connect Paddle Billing with an API key: choose the products that count, and CrispStats imports past transactions, records new ones and ties each to a visit through customData. - [Connect Dodo Payments revenue to CrispStats](https://docs.crispstats.com/revenue/dodo.md): Connect Dodo Payments with an API key: CrispStats imports past payments and refunds, creates its webhook when the key allows it, and ties each payment to a visit through metadata. - [Connect Creem revenue to CrispStats](https://docs.crispstats.com/revenue/creem.md): Connect Creem with an API key: CrispStats imports past transactions, creates its webhook when the key allows it, and ties each sale to a visit through the checkout metadata. - [Connect Whop revenue to CrispStats](https://docs.crispstats.com/revenue/whop.md): Connect Whop with a company API key and company ID: CrispStats imports past payments, creates its webhook when the key allows it, and ties each sale to a visit through checkout metadata. - [Connect Razorpay revenue to CrispStats](https://docs.crispstats.com/revenue/razorpay.md): Connect Razorpay with your live key ID and key secret: CrispStats imports past payments, checks for new ones every 2 minutes and ties each to a visit through order or subscription notes. - [Connect Freemius revenue to CrispStats](https://docs.crispstats.com/revenue/freemius.md): Connect Freemius with your API Bearer token and Product ID: CrispStats imports past payments, checks for new ones every 2 minutes and supports live and sandbox events. - [Connect Lemon Squeezy revenue to CrispStats](https://docs.crispstats.com/revenue/lemon-squeezy.md): Connect Lemon Squeezy with an API key and choose your store: CrispStats imports past orders, creates its webhook and ties each order to a visit through checkout custom data. - [Connect Shopify revenue to CrispStats](https://docs.crispstats.com/revenue/shopify.md): Connect a Shopify store with the client ID and secret of an app you create in your Dev Dashboard: CrispStats imports past orders, records new ones and ties each to a visit through a cart attribute. - [Connect RevenueCat revenue to CrispStats](https://docs.crispstats.com/revenue/revenuecat.md): Connect RevenueCat with a v2 secret API key: CrispStats imports App Store and Google Play purchases, adds its webhook when the key allows it, and links purchases to visits through your user id. - [Connect Superwall revenue to CrispStats](https://docs.crispstats.com/revenue/superwall.md): Connect Superwall with an organization API key, then choose the project and application: CrispStats reads paywall purchases, renewals and refunds and links them to visits through your user id. - [Connect App Store sales to CrispStats](https://docs.crispstats.com/revenue/app-store.md): Connect App Store Connect with a team key that has Sales access, your Issuer ID, Key ID and vendor number: CrispStats reads Apple's daily sales reports for the apps you choose. - [Connect Shopify App Store earnings to CrispStats](https://docs.crispstats.com/revenue/shopify-app-store.md): Connect the earnings of an app you sell in the Shopify App Store with a Partner API token, your Partner ID and App ID, and link installs to your site's visitors by identifying them with their shop domain. - [Report payments to CrispStats with the payment API](https://docs.crispstats.com/revenue/payment-api.md): Report payments from any provider or your own billing with a server-side revenue event, trackServer, or crispstats.revenue() in the browser. - [Refunds, renewals and payment types in CrispStats](https://docs.crispstats.com/revenue/refunds-and-renewals.md): How CrispStats records one-time payments, new subscriptions, renewals and refunds per provider, deduplicates webhooks, hashes emails and exports CSV. - [Import your revenue history into CrispStats](https://docs.crispstats.com/revenue/history.md): When you connect a payment provider with a key, CrispStats imports the payments and refunds made before you connected, so revenue, MRR and All time cover your whole history. - [Read the CrispStats overview dashboard](https://docs.crispstats.com/dashboard/overview.md): What each part of the CrispStats overview shows: the KPI tiles and traffic chart, insights, breakdown cards, the details table, the activity card and live visitors. - [Filter, change dates and compare periods in CrispStats](https://docs.crispstats.com/dashboard/filters-and-comparison.md): Change the date range, chart interval and comparison period in CrispStats, add filters with is, is not and contains, and share any view through its URL. - [Watch visitors and sales live in CrispStats](https://docs.crispstats.com/dashboard/realtime.md): Use the CrispStats realtime screen to see who is on your site now, whether that is normal, where they are, what they are doing, and every sale and new customer the moment it lands. - [Visitor profiles and journeys in CrispStats](https://docs.crispstats.com/dashboard/visitors.md): Browse the CrispStats visitors list by segment, open a visitor's profile and follow each session step by step, and learn what a visitor id covers. - [Explore custom events and their properties in CrispStats](https://docs.crispstats.com/dashboard/events.md): Use the CrispStats Events screen to see every custom event in a date range, sort them, open property breakdowns and copy snippets to send new events. - [Set up goals and conversions in CrispStats](https://docs.crispstats.com/dashboard/goals.md): Create CrispStats goals from a custom event or a page path with wildcards, give them a value, and see completions and conversion rate on the dashboard. - [Build conversion funnels in CrispStats](https://docs.crispstats.com/dashboard/funnels.md): Build a CrispStats funnel from page and event steps with a conversion window, then read conversion, drop-off, where people went instead and segment splits. - [Measure retention with cohorts in CrispStats](https://docs.crispstats.com/dashboard/retention.md): Read the CrispStats retention cohort table by day, week or month, and learn why retention counts only identified and persistent visitors, not daily anonymous ids. - [CrispStats dashboard keyboard shortcuts](https://docs.crispstats.com/dashboard/keyboard-shortcuts.md): Every CrispStats dashboard keyboard shortcut: g then a key to jump to a page, the command menu, date range, filters, theme and sidebar keys, and when they are ignored. - [Share a public dashboard of your site's traffic](https://docs.crispstats.com/share/public-dashboard.md): Turn on a read-only CrispStats dashboard that anyone with the link can open, choose its link name, show or hide revenue and keep it out of search engines. - [Show live numbers with widgets](https://docs.crispstats.com/share/widgets.md): Put a live visitor count, a traffic figure, verified revenue, uptime or your Domain Rating on your own site, a GitHub README or a Notion page, in five styles, without tracking the people who see it. - [Live visitors widget](https://docs.crispstats.com/share/widgets/live.md): Show how many people are on your site right now as a pill, a card with per-minute bars and top countries, or a README badge, with a floor that hides small numbers. - [Traffic figure widgets: visitors, pageviews and AI visitors](https://docs.crispstats.com/share/widgets/stat.md): Show visitors, pageviews, sessions or visitors from AI assistants over a range, with the change and a chart, as a pill, a card, a goal bar or a README badge. - [Verified revenue and sales widgets](https://docs.crispstats.com/share/widgets/revenue.md): Show MRR, revenue or a sales count synced from Stripe, Paddle, Shopify, the App Store and the other connected providers, as a band, an exact figure or growth, with a public proof page that explains how it was counted. - [Uptime widgets: status and 90 days of uptime](https://docs.crispstats.com/share/widgets/uptime.md): Show the current status and uptime of one of your monitors as a pill, a strip with one bar per day for 30 or 90 days, or a README badge. - [Domain Rating widgets](https://docs.crispstats.com/share/widgets/domain-rating.md): Show your site's Domain Rating from Ahrefs on your site or README as a gauge card, a pill or a badge, with the attribution Ahrefs requires. - [Site summary widget: monthly visitors and Domain Rating](https://docs.crispstats.com/share/widgets/site-summary.md): One card with your visitors in the last 30 days, your Domain Rating from Ahrefs and a 30-day trend line, for your site, a README or a Notion page. - [Brand badge: Powered by CrispStats](https://docs.crispstats.com/share/widgets/brand-badge.md): Paste a static Powered by CrispStats or Analytics by CrispStats badge on any page or README, in light, dark or outline and two sizes. It shows no data and needs no account. - [Embed a widget: script, iframe, README, Notion and React](https://docs.crispstats.com/share/widgets/embed.md): Every way to paste a CrispStats widget: the script and element, an iframe for Notion and strict pages, a dark-mode-aware README image, a shields.io badge, React and Next.js, a first-party proxy, and notes for each site builder. - [Widget JSON and endpoints](https://docs.crispstats.com/share/widgets/json-api.md): Fetch a CrispStats widget's data as JSON to draw it yourself: the WidgetPayload fields, the batch endpoint, the shields.io endpoint, caching, errors and the /w/v1 compatibility promise. - [Show a live visitor count on your site](https://docs.crispstats.com/share/live-visitor-badge.md): Publish one number, the visitors on your site right now, and show it on your own pages with a small HTML and JavaScript badge from CrispStats. - [Publish an uptime status page for your site](https://docs.crispstats.com/share/status-page.md): Publish a public CrispStats status page with an overall status, 90-day uptime bars for each monitor and 14 days of incidents, on your site's public link. - [Export your analytics and payments as CSV files](https://docs.crispstats.com/share/csv-export.md): Download CrispStats traffic over time, breakdowns by any dimension and attributed payments as CSV files, from Settings, the Overview and the Revenue page. - [Download your raw events](https://docs.crispstats.com/share/raw-events.md): Download every event CrispStats recorded for a site, one month at a time, as CSV or JSON lines: who can, every column and its unit, the 500,000-row file limit and the API for more. - [Monitor Core Web Vitals from real visits](https://docs.crispstats.com/health/web-vitals.md): Measure LCP, INP, CLS, FCP and TTFB in your visitors' browsers with data-vitals, then read the score, percentiles and slowest pages on the Performance screen. - [Track JavaScript errors from real visits](https://docs.crispstats.com/health/errors.md): Collect uncaught JavaScript errors and unhandled promise rejections with data-errors, then group, search, resolve and ignore them on the Errors screen. - [Monitor uptime and response time for your site](https://docs.crispstats.com/health/uptime.md): Create uptime monitors that request a URL on a schedule from Cloudflare's network, record response times and incidents, and alert you when a site goes down. - [Get alerted when traffic, revenue or site health changes](https://docs.crispstats.com/alerts/overview.md): Create CrispStats alert rules as a sentence, choose how often they repeat, send them to your channels, test each channel and check what was delivered. - [Alert rule types reference](https://docs.crispstats.com/alerts/rule-types.md): Every CrispStats alert rule type: what it watches, the unit of its threshold, the windows the dashboard offers, its defaults and when it fires. - [Send alerts to email, Slack, Discord, Telegram or a webhook](https://docs.crispstats.com/alerts/channels.md): Add CrispStats notification channels for email, Slack, Discord, Telegram and signed webhooks: the destination each needs, URL rules and what each message shows. - [See traffic from AI assistants](https://docs.crispstats.com/ai/ai-traffic.md): How CrispStats spots visitors sent by ChatGPT, Perplexity, Claude, Gemini and other AI assistants, and how to read the AI traffic screen to act on it. - [Report AI crawler hits from your server or edge](https://docs.crispstats.com/ai/ai-crawlers.md): Count GPTBot, ClaudeBot, PerplexityBot and other AI crawlers in CrispStats from Next.js proxy.ts, a Cloudflare Worker or any server with a POST to /bot. - [Ask questions about your data with Ask AI](https://docs.crispstats.com/ai/ask-ai.md): Use Ask AI in the CrispStats dashboard to ask about traffic and revenue in plain words, find out why a number moved, and have goals, funnels, alerts and notes prepared for you to confirm. - [Connect Claude and other AI assistants to your analytics](https://docs.crispstats.com/ai/connect-ai-assistants.md): Connect Claude Code, claude.ai, Cursor, VS Code, Codex or Windsurf to the CrispStats MCP server with a read-only API key, then ask about your numbers or let a coding agent check its install. - [How CrispStats counts visitors without cookies](https://docs.crispstats.com/privacy/cookieless-tracking.md): CrispStats identifies visitors with a daily-rotating hash of a random salt, the site, the IP address and the User-Agent. No cookie, nothing stored in the browser. - [Recognise returning visitors with persistent visitors](https://docs.crispstats.com/privacy/persistent-visitors.md): Turn on persistent visitors to recognise the same browser across days: one switch in settings, then the updated snippet with data-persist, which stores a random id in localStorage. - [What data CrispStats collects and stores](https://docs.crispstats.com/privacy/data-collected.md): The fields every CrispStats event carries, what the collector derives and discards, how URLs, location and payment emails are reduced, and how long data is kept. - [How bots and automated traffic are filtered](https://docs.crispstats.com/privacy/bot-filtering.md): What the CrispStats script skips, what the collector drops silently, how to choose the off, standard or strict bot filter, and how AI crawlers are counted apart. - [Privacy and compliance facts for CrispStats](https://docs.crispstats.com/privacy/compliance.md): A factual sheet for a privacy or legal review of CrispStats: cookies, storage, IP and User-Agent handling, identifiers, processors, retention and contacts. - [Manage sites and site settings](https://docs.crispstats.com/account/sites-and-settings.md): Add a site, change its name, domain, extra hostnames, timezone and currency, rotate its public key, or transfer, reset or delete it from the danger zone in CrispStats. - [Transfer a site to another workspace](https://docs.crispstats.com/account/transfer-a-site.md): Move a CrispStats site and everything recorded for it to another workspace you own: who can, what moves, what changes, the blockers and how to clear each one. - [Reset a site's stats](https://docs.crispstats.com/account/reset-stats.md): Delete everything CrispStats recorded for a site and start counting from zero while keeping its settings, snippet, goals and payments: who can, what is deleted, what stays and how long it takes. - [Invite your team and assign roles](https://docs.crispstats.com/account/team-and-roles.md): Invite people to your CrispStats workspace, pick owner, admin, member or viewer for each, resend or revoke invitations and stay within your plan's seats. - [Create and manage API keys](https://docs.crispstats.com/account/api-keys.md): Create secret cs_sk_ API keys in CrispStats with read, events, write or admin scopes, limit a key to one site, copy it once, and revoke or delete it. - [Plans, limits and overage](https://docs.crispstats.com/account/plans-and-limits.md): Start with a 14-day CrispStats trial, no card required, then compare Starter, Growth and Scale, see what happens at each limit and when a trial or plan ends, and work out overage per 100k events. - [Manage your subscription and invoices](https://docs.crispstats.com/account/billing.md): See the days left in your 14-day CrispStats trial, pick a plan in Stripe Checkout, change or cancel it, update payment details, track usage and overage, and download invoices. - [Troubleshoot a script that is not sending data](https://docs.crispstats.com/help/troubleshooting.md): A checklist for when CrispStats shows no visits: localhost and automated browsers, data-domains, the setup check, the /e request and its 202, proxies, CSP and exclusions. - [Count visitors who use ad blockers](https://docs.crispstats.com/help/ad-blockers.md): Why some ad blockers stop the CrispStats script, how to spot it, and how serving the script and collector from your own domain counts those visitors again. - [Allow CrispStats in your Content Security Policy](https://docs.crispstats.com/help/content-security-policy.md): Add https://in.crispstats.com to script-src and connect-src, or 'self' behind a proxy, so a Content Security Policy does not block the CrispStats script and events. - [Frequently asked questions about CrispStats](https://docs.crispstats.com/help/faq.md): Short answers about CrispStats: cookies and consent, no npm package needed, why numbers differ from other tools, whether there is a free plan, what happens at the plan limit, and features that are not offered yet. - [CrispStats REST API overview](https://docs.crispstats.com/api-reference/introduction.md): Read stats, breakdowns, revenue, funnels, visitors and site health from the read-only CrispStats REST API at crispstats.com/api/v1, with a keyless demo site. - [Authenticate API requests](https://docs.crispstats.com/api-reference/authentication.md): Authenticate CrispStats REST API and MCP requests with a secret cs_sk_ key as a bearer token. Scopes, site-restricted keys and what 401, 403 and 404 mean. - [Date ranges, filters, comparison and pagination](https://docs.crispstats.com/api-reference/query-parameters.md): Choose a period with range or from and to, compare with the previous period or year, filter with dimension:op:value, set granularity and page through results. - [API rate limits](https://docs.crispstats.com/api-reference/rate-limits.md): CrispStats API keys get a daily request allowance from the plan plus a burst limit of 20 requests per 10 seconds. Read the X-RateLimit headers and Retry-After, and the collector's per-address and per-site limits. - [API errors](https://docs.crispstats.com/api-reference/errors.md): Every CrispStats API error uses one JSON envelope with a stable code, a readable message and per-parameter fields. Status codes 400 to 500 and how to handle each. - [Sites](https://docs.crispstats.com/api-reference/sites/sites.md): The sites this key can read. Without a key, the public demo site. - [Key metrics](https://docs.crispstats.com/api-reference/analytics/key-metrics.md): The headline numbers for a period: unique visitors, sessions, pageviews, views per visit, bounce rate, average visit duration, revenue, conversion rate (first payments divided by visitors) and revenue per visitor. Use this for any "how many", "how much" or "what is the rate" question about the site… - [Traffic over time](https://docs.crispstats.com/api-reference/analytics/traffic-over-time.md): Visitors, pageviews, sessions, revenue and conversions per time bucket across a period: use it for trends, peaks, "which day" questions and anything drawn as a line. `granularity` is hour, day, week or month and defaults to a sensible size for the period; at most 400 buckets are returned, so pick a… - [Breakdown](https://docs.crispstats.com/api-reference/analytics/breakdown.md): Ranks the values of one dimension for a period: top pages, entry and exit pages, sources, referrers, channels, UTM campaign fields, countries, regions, cities, browsers, operating systems, devices, languages, custom events or AI assistants. Each row has visitors, pageviews, sessions, bounce rate, av… - [Live visitors](https://docs.crispstats.com/api-reference/analytics/live-visitors.md): Who is on the site right now: the number of visitors active in the last 5 minutes, active visitors per minute for the last 30 minutes, the pages, sources and countries they are on or from, and the most recent events. Takes no period. Use it for "right now", "live" and "currently online" questions. M… - [Revenue summary](https://docs.crispstats.com/api-reference/analytics/revenue-summary.md): Revenue for a period: gross revenue, revenue from new customers, renewal revenue, refunds (reported separately, not subtracted), MRR, paying customers, average order value, revenue per visitor, conversion rate and the median days from first visit to first payment. Use it for money questions about th… - [Payments](https://docs.crispstats.com/api-reference/analytics/payments.md): Individual payments in a period, newest first, each with its amount, kind (one_time, subscription_new, subscription_renewal or refund; refunds have a negative amount), provider, product and first-touch attribution: the source, channel, campaign and landing page that brought the customer, days from f… - [Goals](https://docs.crispstats.com/api-reference/analytics/goals.md): The site's goals (a custom event or a page pattern the owner marked as a conversion) with their numbers for a period: completions, unique visitors who completed it, conversion rate against all visitors and attributed revenue. Use it for "how is goal X doing" and to learn which goals exist. Takes `ra… - [Custom events](https://docs.crispstats.com/api-reference/analytics/custom-events.md): The custom events the site sends (signup, purchase, button clicks and so on) for a period, most frequent first: how many times each fired, how many unique visitors triggered it, its change against the comparison period, attributed revenue and when it was last seen. Use it to learn which events exist… - [Event properties](https://docs.crispstats.com/api-reference/analytics/event-properties.md): The properties one custom event was sent with, and for each property its most common values with counts, unique visitors and share: for example the `plan` values on a `signup` event. Pass the event's exact name from list_events. Takes `range` (a preset) or `from` and `to`, optional `compare` and `fi… - [Funnels](https://docs.crispstats.com/api-reference/analytics/funnels.md): The funnels defined for the site: each one's id, name, ordered steps (an event or a page pattern per step) and the time window a visitor has to complete it. Takes no period. Call this first to find a funnel's id, then get_funnel for its numbers. - [Funnel](https://docs.crispstats.com/api-reference/analytics/funnel.md): How visitors move through one funnel in a period: visitors at each step, conversion from the first step and from the previous step, drop-off, median time between steps, the pages people who dropped went to next, overall conversion and revenue. Pass `segmentBy` to split the funnel by a dimension (for… - [Retention](https://docs.crispstats.com/api-reference/analytics/retention.md): Retention cohorts: visitors grouped by when they were first seen, and the share of each cohort that came back in each later day, week or month (`values[0]` is always 1; null means that interval has not happened yet). Also returns the size-weighted average per interval. Use it for "do people come bac… - [Visitors](https://docs.crispstats.com/api-reference/analytics/visitors.md): Individual visitors seen in a period: an anonymous handle, country, city, device, browser, first and last seen, sessions, pageviews, events, lifetime revenue, first source and channel, and whether they are online now. `segment` narrows to customers, identified, online or returning visitors; `sort` o… - [Visitor journey](https://docs.crispstats.com/api-reference/analytics/visitor-journey.md): One visitor's profile and journey: the same fields as list_visitors plus their most recent sessions, each with its source, campaign, entry and exit page, device, duration and the ordered steps (pageviews, custom events, payments, errors) with time spent. Returns up to `sessions` sessions and 25 step… - [Web vitals](https://docs.crispstats.com/api-reference/analytics/web-vitals.md): Core Web Vitals measured on real visits in a period: a 0 to 100 score (the share of visits where every core vital passes), and for LCP, INP, CLS, FCP and TTFB the p50, p75 and p90, a good / needs_improvement / poor rating, the share of samples in each rating and the previous period's p75. Also the s… - [JavaScript errors](https://docs.crispstats.com/api-reference/analytics/javascript-errors.md): JavaScript errors seen in visitors' browsers in a period: total occurrences, affected visitors, the share of sessions with no error, and the error groups ranked by occurrences, each with its type, message, status (open, resolved or ignored), first and last seen, and the pages and browsers it happens… - [Uptime](https://docs.crispstats.com/api-reference/analytics/uptime.md): Uptime monitoring for a period: each monitor's current status (up, down, degraded or paused), uptime as a 0..1 rate, average and p95 response time in milliseconds, last check and TLS certificate expiry, plus the incidents in the period with their start, end, duration in seconds and cause. Use it for… - [AI traffic](https://docs.crispstats.com/api-reference/analytics/ai-traffic.md): Traffic from AI assistants in a period: people who arrived from ChatGPT, Claude, Perplexity, Gemini and others (visitors, share of all traffic, revenue, conversion rate), each assistant's numbers, the pages assistants send people to, and AI crawler hits by bot with its operator and purpose (training… - [Raw events](https://docs.crispstats.com/api-reference/raw-events.md): Page through a site's recorded events, one object per event, with a CrispStats API key that has the admin scope: from, to, cursor and limit, and what each field holds. - [Collector endpoints reference](https://docs.crispstats.com/api-reference/collector.md): Reference for the public CrispStats collector at in.crispstats.com: the script, POST /e for browser and server events, GET /id, the /p proxy routes, the setup check, /bot and the live count. - [MCP server reference](https://docs.crispstats.com/api-reference/mcp.md): The CrispStats MCP server at crispstats.com/api/mcp gives AI assistants read-only analytics and setup tools and ready prompts over Streamable HTTP. Auth, transport, every tool, prompt and input. - [Alert webhooks and signature verification](https://docs.crispstats.com/api-reference/webhooks.md): CrispStats webhook channels POST signed JSON when an alert fires or recovers. Payload fields, headers, HMAC-SHA256 verification and deduplication, with code samples. ## OpenAPI Specs - [openapi](/api-reference/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.