# SquareSpace

## Add Humblytics Analytics to Squarespace

**Note**: Code Injection requires a Squarespace **Business plan** or higher. If you're on a Personal plan, you'll need to upgrade to add custom code.

### 1 · Sign up (or log in)

Visit humblytics.com → Start Free Trial. Finish signup—or log in to your existing workspace.

### 2 · Add your website in Humblytics

In the sidebar, click **Add Website**.

* **Domain** – enter `your-domain.com` (omit `https://` and `www`)
* **Site Name** – internal label (e.g. `Marketing-Prod`)

Copy the snippet from **Install Tracking Code**:

html

```html
<!-- Start Humblytics Tracking Code -->
<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>
<!-- End Humblytics Tracking Code -->
```

Keep this tab open—we'll return and click **Verify Website** once the tag is live.

### 3 · Add the script to Squarespace

#### Option 1: Site-wide tracking (recommended)

**Best for:** Tracking all pages on your site

1. In your Squarespace dashboard, go to **Settings → Advanced → Code Injection**
2. Under **Header**, paste your Humblytics script:

html

```html
<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>
```

3. Click **Save**

This injects the script into the `<head>` of every page on your site.

#### Option 2: Single page tracking

**Best for:** Tracking specific landing pages or sections only

1. In the page editor, click the **gear icon (⚙️)** next to the page name
2. Go to **Advanced → Page Header Code Injection**
3. Paste your Humblytics script:

html

```html
<script async src="https://app.humblytics.com/hmbl.min.js?id=YOUR_ID_HERE"></script>
```

4. Click **Save**

This limits tracking to that specific page only.

**Note**: Replace `YOUR_ID_HERE` with your actual project ID from Humblytics.

### 4 · Publish your changes

⚠️ **Important**: Saving the code doesn't make it live. You must publish your site.

1. Click **Save** in Code Injection settings
2. If changes aren't already published, you'll see a banner at the top
3. Click **Publish** or **Unsaved Changes → Review** and then **Publish**

Your Humblytics script is now live.

### 5 · Verify installation

1. Return to Humblytics and click **Verify Website**
2. Open your live Squarespace site in a private/incognito window and refresh once
3. Within \~30 seconds you should see a green **Verified** badge and live visitor count

**If verification fails, check:**

**Squarespace-specific issues:**

* You have a **Business plan or higher** (Code Injection isn't available on Personal plans)
* You clicked **Publish** after saving the code
* Script is in **Header** section, not Footer
* You're testing your live domain, not the Squarespace preview URL

**General issues:**

* Script ID matches your project in Humblytics
* View page source (right-click → View Page Source) and search for "humblytics" to confirm script loads
* No ad-blockers or browser extensions are blocking the script
* Try a different browser or device

**Can't find Code Injection?** If you don't see **Settings → Advanced → Code Injection**, you're likely on a Personal plan. You'll need to upgrade to Business, Commerce, or Enterprise to add custom code.

### 6 · Explore & optimize

* **Dashboard** – view traffic, top pages, and referrers
* **Heatmaps** – auto-generated for clicks and scroll depth
* **Experiments** – run A/B tests directly from Humblytics (Experiments → New Test)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.humblytics.com/how-to-get-started/squarespace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
