# Squarespace analytics with CrispStats

Updated 2026-11-23

Squarespace analytics with CrispStats is one script tag in the Header field of the Code Injection panel, saved once. Squarespace adds it to the head of every page, and code injection is available on the Core, Plus, Advanced and some legacy billing plans.

## Steps

### 1. Check that your plan has code injection

Squarespace's [help page on code injection](https://support.squarespace.com/hc/en-us/articles/205815908-Using-code-injection) says it "is available in the Core, Plus, Advanced, and some legacy billing plans". On a plan without it there is no site-wide place for a script tag.

### 2. Copy the tag with your key

In the CrispStats dashboard, open your site's **Settings**, select **Tracking code** and copy the tag from the **HTML** tab. Replace `example.com` with your domain if it is not filled in. Only hostnames in `data-domains`, and their subdomains, are counted, so visits to a built-in Squarespace address are left out unless you add it.

```html
<script
  defer
  data-site="cs_pk_your_site_key"
  data-domains="example.com"
  src="https://in.crispstats.com/d.js"
></script>
```

### 3. Paste it into Header

Open the **Code Injection** panel of your site, paste the tag into the **Header** field and select **Save**. Use the site-wide **Header** field, not a single page's header injection in its **Advanced** settings, so every page is covered.

### 4. Test in a private window

Squarespace lets you disable scripts in the editor preview when injected code gets in the way, so the editor is not a reliable place to test. Open your live site in a private window instead.

### 5. Turn on extra events (optional)

Add attributes to the tag in the **Header** field and save. `data-outbound` counts clicks to other sites and `data-downloads` counts links to files such as PDFs:

```html
<script
  defer
  data-site="cs_pk_your_site_key"
  data-domains="example.com"
  data-outbound
  data-downloads
  src="https://in.crispstats.com/d.js"
></script>
```

### 6. Count a click (optional)

Where you can add your own HTML to a page, for example in a code block, put `data-cs-event` on a link or button, with properties from `data-cs-prop-` attributes.

```html
<a href="/book" data-cs-event="booking click" data-cs-prop-place="home">Book a session</a>
```

## Check that it works

Open your live site in a private window with the developer tools on the **Network** tab. You should see `d.js` load from `in.crispstats.com` and a `POST` to `/e` that gets `202`. Click through a few pages: each sends another `POST`, and the pages appear on the **Realtime** screen within seconds. The status row on the CrispStats **Tracking code** tab shows **Receiving events.** once the first event is stored.

## What you get

- Pageviews, unique visitors and sessions for every page that takes code injection, including blog posts and product pages.
- Sources and channels: search, social, newsletters tagged with [UTM parameters](/glossary/utm-parameters), and visits from AI assistants such as ChatGPT and Perplexity.
- Entry and exit pages, countries, devices and browsers, with no cookies and no IP addresses stored.
- Bookings and form submissions as [goals](/glossary/goal): make the page visitors land on after the form a goal with a **Page visit** rule.
- Optional [web vitals](/features/web-vitals) and [JavaScript errors](/features/error-tracking) from real visits, switched on with `data-vitals` and `data-errors`.

## Notes for Squarespace

- Squarespace says checkout pages do not support code, so the script does not run during checkout. Pageviews on the rest of the site are counted as usual.
- There is no Squarespace integration for orders. You can report payments from a server you run with the [payment API](/docs/revenue/payment-api); CrispStats has no product, inventory or margin reports.
- If your template changes pages without a full reload and the URL changes through the History API, each new URL counts as a pageview too. The same URL twice in a row is one pageview.
- Squarespace cannot run the forwarding rule that serves the script from your own domain, so the script loads from `in.crispstats.com` and visitors whose ad blocker stops that host are not counted. See [the proxy guide](/docs/tracking/proxy) for what the rule needs.

Full reference: [Squarespace in the docs](https://docs.crispstats.com/install/squarespace)

## Frequently asked questions

### Which Squarespace plans can add an analytics script?

Squarespace's help page lists code injection on the Core, Plus and Advanced plans and some legacy billing plans. On a plan without code injection there is no site-wide place for the tag.

### Can it track Squarespace Commerce orders?

Not automatically. Squarespace checkout pages do not support custom code, and there is no built-in integration. You can report payments from your own server with the payment API.

### Why do I see no visits while I edit the site?

The editor preview is not a reliable place to test, because scripts can be disabled there. Open the live site in a private window on your own domain.

### Do I need a cookie banner for analytics on Squarespace?

CrispStats sets no cookies and stores nothing on the visitor's device by default. Squarespace and other scripts on your site may, so check the whole site. This is not legal advice.

### What does it cost for a Squarespace site?

CrispStats is billed apart from Squarespace, by monthly events only. Every account starts with a 14-day free trial with every feature and no card; then Starter is $5 a month for 250,000 events. The Squarespace side still needs a plan with code injection.

## Related

- [Privacy-friendly analytics for bloggers](/for/bloggers)
- [Cookieless analytics for online stores](/for/ecommerce)
- [Bounce rate vs engagement](/blog/bounce-rate-vs-engagement)
- [Traffic source classifier](/tools/traffic-source-classifier)
- [Wix analytics](/integrations/wix)
