Skip to main content
To start using CrispStats, add your site in the dashboard, paste one script tag into your pages, and wait for the first pageview to arrive. This guide then sends a custom event, so you leave with pageviews and events both flowing. You need a CrispStats account and the ability to edit your site’s HTML or layout. Every account starts with a 14-day free trial, no card required, with every feature.
1

Create an account

Sign up at crispstats.com/signup. When your account has no sites yet, signing in takes you straight to the Add your site step.
2

Add your site

Fill in the form and select Add site:
  • Domain: the domain of your site, like example.com. Subdomains are counted too. If you paste a full URL, only the domain is kept.
  • Site name: how the site shows in your list of sites.
  • Timezone: days in your reports start and end in this timezone. It defaults to your browser’s timezone.
  • Workspace: shown only when you can add sites to more than one workspace. Everyone in the workspace you pick can open the site.
You can change all of these later in the site’s settings. CrispStats creates the site and gives it a public key that starts with cs_pk_. The key tells the collector which site an event belongs to, and it is safe to publish.
3

Paste the script

The Install the script step shows the tag with your key filled in, plus tabs with the exact code for each framework. For a plain HTML site, add this inside <head> on every page:
Replace cs_pk_xxxxxxxx with your key and example.com with your domain: data-domains keeps preview deployments and copies of your site from being counted. Use a classic script tag with defer or async: type="module" does not work, because the script reads its options from its own tag.For Next.js, React, Vue, Astro, SvelteKit, WordPress, Shopify and other platforms, follow the matching install guide. Deploy the change, then select I have added it.
4

Confirm the first visit

The First visitor step listens for events from your domain and checks every 3 seconds. Open your live site in a browser where the script is in place. The first pageview shows up within a few seconds, the step confirms the install, and Open dashboard takes you to the site’s overview.
The script ignores pages on localhost, 127.0.0.1 and file://, and automated browsers such as Playwright, so development visits and test runs do not count. Open your deployed site in a normal browser window. To see events on localhost, add data-debug to the tag: it logs every event in the console and sends nothing. See localhost and testing.
If nothing arrives after a minute, check for an ad blocker, a Content Security Policy that blocks in.crispstats.com, or a cached version of the page without the tag. Troubleshooting walks through each cause.
5

Send a custom event

Call the crispstats global wherever the action happens, with an event name and optional flat properties:
Or track a click without writing JavaScript, using HTML attributes:
Trigger the action on your site, then open Events in the dashboard sidebar. The event appears with its properties. To call crispstats() from inline code that may run before the script loads, add the queue stub described in custom events.
Your site now reports pageviews, sources, engagement and custom events. With the default setup the script sets no cookie and stores nothing on your visitors’ devices. See cookieless tracking for how visitors are counted.

Next steps

Turn on optional modules

Add outbound links, file downloads, web vitals, JavaScript errors and 404 tracking with one attribute each.

Set up goals

Mark the events and pages that count as conversions.

Connect revenue

Attribute payments from Stripe and other providers to the visit that led to them.

Count ad-blocked visitors

Serve the script and collector from your own domain.
Last modified on November 27, 2026