> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crispstats.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## 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.

# Install CrispStats on Webflow

> 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.

To install CrispStats on Webflow, paste the script tag into the site-wide **Head code** field and publish. Head code is added to every page of the published site, so one paste covers the whole site.

## Add the script

**1. Copy the Webflow snippet**

In the CrispStats dashboard, open your site's **Settings**, select **Tracking code** and choose the **Webflow** tab. It has your public key filled in:

```html theme={"theme":{"light":"github-light","dark":"github-dark"}}
<!-- Site settings, Custom code, Head code. Then publish. -->
<script
  defer
  data-site="cs_pk_xxxxxxxx"
  data-domains="example.com"
  src="https://in.crispstats.com/d.js"
></script>
```

**2. Paste it into Head code**

In Webflow, open your project's **Site settings**, go to **Custom code** and paste the tag into **Head code**. Save the changes. Webflow only allows site-wide custom code on a paid site or workspace plan.

**3. Publish the site**

Custom code runs only on the published site, not in the Designer. Publish to your domain, then open the live site in a browser. The status row on the CrispStats **Tracking code** tab shows **Receiving events.** once the first event has been stored.

## Add optional modules

The switches under **Extra events** on the **Tracking code** tab add attributes to the tag. Copy the updated tag from the **Webflow** tab, replace the one in **Head code** and publish again. For example, with outbound links and file downloads on:

```html theme={"theme":{"light":"github-light","dark":"github-dark"}}
<script
  defer
  data-site="cs_pk_xxxxxxxx"
  data-domains="example.com"
  data-outbound
  data-downloads
  src="https://in.crispstats.com/d.js"
></script>
```

If your Webflow site is also reachable on its `webflow.io` staging domain, add `data-domains` with your own domain so visits to the staging copy are not counted. See [script attributes](https://docs.crispstats.com/tracking/script-attributes.md).

## Check that it works

* Open your published site with the browser's developer tools on the **Network** tab. You should see `d.js` load from `in.crispstats.com` and a `POST` to `https://in.crispstats.com/e` that gets `202`.
* Open the page source and search for `in.crispstats.com/d.js`. If it is missing, the site was not published after you saved the head code, or you are looking at a page that was cached before.
* Open `https://in.crispstats.com/check?k=cs_pk_xxxxxxxx` with your key. `"site": "known"` means the key is right. The visit appears in **Realtime** within seconds.

If the tag is there but nothing arrives, check `data-domains`: a visit on the `webflow.io` staging address does not count when only your own domain is listed, which is usually what you want.

## How page changes are counted

Each page of a Webflow site is a full page load, so the script counts one pageview per page. Links to a section on the same page (`#pricing`) are not new pages: the script drops the fragment unless the tag has `data-hash`, which a Webflow site does not need. UTM parameters on links into your site are kept, so campaigns show under **Sources**.

## Send custom events

* **Clicks on a button or link**: where you can set custom attributes on an element, add an attribute named `data-cs-event` with the event name as its value, such as `signup click`. Add `data-cs-prop-plan` with a value to send a property. No JavaScript is needed. See [declarative events](https://docs.crispstats.com/track/declarative-events.md).
* **Form submissions**: point the form's redirect at a thank-you page and add a [goal](https://docs.crispstats.com/dashboard/goals.md) with a **Page visit** rule for that path.
* **Clicks to other sites and file downloads**: turn on **Outbound links** and **File downloads** to add `data-outbound` and `data-downloads` to the tag.

## FAQ

> [accordion] Why do I see no visits from the Designer?
>
> Custom code runs only on the published site, not in the Designer. Publish, then open the live site.

> [accordion] Do visits to my webflow\.io address count?
>
> Only if that hostname is in `data-domains`. List only your own domain to keep staging visits out.

> [accordion] Do I need a cookie banner for CrispStats?
>
> By default the script sets no cookie and stores nothing on the visitor's device. See [compliance](https://docs.crispstats.com/privacy/compliance.md). This is not legal advice.

## Next steps

> [card] [Declarative events](https://docs.crispstats.com/track/declarative-events.md)
>
> Track button clicks with `data-cs-event` attributes, no JavaScript.

> [card] [Script attributes](https://docs.crispstats.com/tracking/script-attributes.md)
>
> Every option the script tag accepts.

> [card] [Troubleshooting](https://docs.crispstats.com/help/troubleshooting.md)
>
> What to check when no events arrive.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.