Source: https://datafa.st/docs/squarespace
Markdown source: https://datafa.st/docs/squarespace.md
Description: How to add DataFast to your SquareSpace site

# Add DataFast to your SquareSpace site

Follow these steps to integrate DataFast analytics into your SquareSpace site.

## Add tracking script using Code Injection

SquareSpace provides Code Injection features to add custom HTML and JavaScript.

1. Log in to your SquareSpace dashboard
2. Go to **Settings** > **Advanced** > **Code Injection**
3. In the **Header** section, paste your DataFast tracking script:

    ```html
    <script
      defer
      data-website-id="dfid_******"
      data-domain="your_domain.com"
      src="https://datafa.st/js/script.js"
    ></script>
    ```

    > Replace `dfid_******` with your actual Website ID from DataFast.
    > Replace `your_domain.com` with your website's root domain.

4. Click **Save**

## Alternative: Using Code Block

You can also add the script using a Code Block on individual pages:

1. Edit the page where you want to add tracking
2. Click **+** to add a new block
3. Select **Code** from the block menu
4. Paste the DataFast tracking script
5. Make sure "Display Source" is unchecked
6. Save the page

## Verify installation

After implementing:
- Visit your live SquareSpace site
- Check your [DataFast dashboard](/dashboard) for incoming data
- It might take a few minutes for the first pageviews to appear

> For advanced configuration options like localhost tracking, custom API endpoints, or cross-domain setup, see the [script configuration reference](/docs/script-configuration).

> Note: Code Injection requires a SquareSpace Business plan or higher. Code Blocks are available on all plans but JavaScript execution requires a Business plan.
