# Add CentPath to Squarespace

> Paste the snippet into the Header field of Squarespace's code injection, on the Core, Plus or Advanced plan.

Add CentPath to your Squarespace site with code injection, so every page of your site counts its visits.

## Before you start

Code injection is on the Core, Plus and Advanced plans, and on some older plans.

## 1. Copy your snippet

In CentPath, open your site, go to **Setup** → **Install** and click **Copy**. The snippet you copy holds your site's own id, so every visit counts for the right site:

```html
<script>window.analytics = window.analytics || Object.assign([], { q: [], goal: function () { this.q.push(arguments); } });</script>
<script defer src="https://centpath.app/script/p.js" data-site-id="YOUR_SITE_ID"></script>
```

## 2. Open Code Injection

1. Open the **Pages** panel and scroll to its bottom.
2. Click **Code Injection**: it's under **Custom Code** or **Website Tools**, depending on your site.

## 3. Paste it into the header

1. Paste the snippet into the **Header** field. Code there goes into the `<head>` of every page, so you paste it once.
2. Click **Save**.

## Verify the setup

1. Open your live site in a private window and load a page.
2. In CentPath, look under the steps in **Setup** → **Install**: **Waiting for your first pageview…** turns into **First pageview received.** once the visit arrives.
3. If it said **First pageview received.** before you started, your site has had visits already: look for this one in your dashboard instead. Reload it, and the visit shows in the **Visits** feed, usually within a minute.

[Check your installation](https://centpath.app/docs/verify-installation) shows more ways to check a page.

## Troubleshooting

### You can't edit Code Injection

Your plan doesn't include code injection: see [Before you start](#before-you-start). On a plan without it, code you added stays in the panel but isn't added to your pages.
