# Squarespace

> Add the Attrifast snippet to your Squarespace site via Settings → Advanced → Code Injection (header) and see your first pageview, usually within a minute.

Last updated: 2026-08-15
Canonical: https://attrifast.com/docs/squarespace

Attrifast works on Squarespace the same way it works everywhere: one script tag in your site's `<head>`. Squarespace's **Code Injection** is built for exactly this — paste once, it ships on every page.

<Callout>

Two requirements before you start: Code Injection needs a **Squarespace Business plan or higher** (personal plans don't execute custom scripts), and Attrifast event collection requires an active subscription or trial — start the 7-day free trial during onboarding (no charge today, cancel anytime).

</Callout>

## Step 1 — Get your snippet

Add your site in Attrifast (onboarding step 1, or the dashboard), then open onboarding step 2 **"Install script"**, or **Dashboard → Settings → Install script**. Copy your snippet — it looks like this, with your own tracking ID:

```html
<script defer data-tracking-id="YOUR_TRACKING_ID" src="https://api.attrifast.com/af.js"></script>
```

## Step 2 — Add it to Squarespace

<Steps>
<Step title="Open Code Injection">

In your Squarespace dashboard go to **Settings → Advanced → Code Injection** (on newer accounts: **Settings → Developer Tools → Code Injection**).

</Step>
<Step title="Paste into Header and save">

Paste the snippet into the **Header** field — not Footer — and click **Save**. Header placement is what lets the tracker see every pageview from the first paint.

</Step>
</Steps>

That's it — Code Injection applies site-wide immediately, no publish step needed.

## Step 3 — Verify

The **Verify installation** status in onboarding step 2 checks automatically — no button to press. Open your live Squarespace site in another tab and the status flips to *"First pageview received — tracking is live."*, usually within a minute. Or just check your dashboard for the visit.

<Callout>

The domain registered in Attrifast must match the domain Squarespace serves from — `www.` and the apex count as the same site, and subdomains are covered automatically. Serving from another domain entirely? Add it under **Dashboard → Settings → General → Allowed hostnames**.

</Callout>

## What you get

Everything in [Install the tracker](/docs/install): pageviews, channel classification (including AI engines like ChatGPT and Perplexity), engagement time, and UTM capture. Selling with Squarespace Commerce through Stripe? Connect [Stripe](/docs/stripe) for revenue attribution.
