Install

Install AnalyticFast with Squarespace Code Injection

The site-wide Header field in Squarespace Code Injection adds the tracker to ordinary site pages. A page code block or order-confirmation snippet covers a different surface.

Install on Squarespace

Start by adding the website in AnalyticFast and selecting its domain, timezone and currency. These examples use https://t.analyticfast.com; the origin and Site ID shown in your site’s Settings take precedence.

  1. Confirm your Squarespace plan supports Code Injection.
  2. Open the site-wide Code Injection panel and paste the complete snippet below into Header.
  3. Save, then visit the public website outside the editor. Check a second page as well as the homepage.
  4. Remove any duplicate installation in a page header, code block, footer or GTM container.
<script defer data-website-id="YOUR_SITE_ID" src="https://t.analyticfast.com/js/script.js"></script>

The Header field maps to the head of each ordinary site page. Page-specific injection is easy to overlook when adding new landing pages, so prefer the site-wide panel. Squarespace’s order-confirmation and order-status fields are separate from this installation. Do not assume a storefront visit or a refreshed confirmation page is payment revenue; use a supported webhook or verified backend handoff for that.

Screenshot placeholder: Squarespace site-wide Code Injection panel with the deferred tracker in Header.

Verify the published website

  1. Replace YOUR_SITE_ID with the ID for this website, then open its public domain in a normal browser. A builder preview, localhost, webdriver or a visit with ?ml_ignore=true may be ignored.
  2. In browser Network tools, check https://t.analyticfast.com/js/script.js and the request to /api/event. A downloaded script or a successful HTTP response alone does not prove that an event was accepted.
  3. Use Verify installation in AnalyticFast and check the last received event. If none arrives, check the Site ID, allowed hostname, consent configuration, duplicate installations and any blocker. Domain ownership verification is a separate step.

If your site has a Content Security Policy, allow https://t.analyticfast.com in both script-src and connect-src. Do not put tokens, customer email addresses or private keys in the snippet, URLs or goal properties.

Connect your consent choice

If your site uses an analytics consent banner, use the pending-consent snippet and connect its Accept and Decline/withdraw actions. Pending mode sets no analytics cookies; it still records visits using the collector’s cookie-free identity mode. A consent manager that blocks the tag entirely prevents those requests. Choose the collection behavior appropriate for your site; pending mode is not a promise of legal compliance.

<script defer data-website-id="YOUR_SITE_ID" data-consent="pending" src="https://t.analyticfast.com/js/script.js"></script>
// In your existing banner handlers:
window.analyticfast?.('consent', true);  // Accept
window.analyticfast?.('consent', false); // Decline or withdraw

Restore a stored choice on later visits. See the consent implementation guide for the full state and identity behavior.

Official platform references

Instructions reviewed against the repository and official platform documentation on October 31, 2026. Screenshots are reserved placeholders; no live platform installation is claimed here.

Add your website to get its Site ID and installation checklist. Once visits arrive, connect your payment provider.

Questions, answered.

Why is the script missing in my Squarespace editor preview?

Check the public site outside the editor. Custom scripts may be suppressed in editing views. Confirm your plan includes Code Injection and that you saved the site-wide Header field, rather than a single page’s field.

Does installing the script also record purchase revenue?

No. It records visits and goals. Connect a supported payment webhook and pass visitor/session IDs into checkout metadata to connect verified payments with traffic. A Buy click or thank-you pageview is not payment confirmation.

Why does the script load but no visit appears?

Check the real Site ID, accepted hostname, published code, consent settings and blockers. Localhost, automation and ignored visits may be excluded. Use the last received event in AnalyticFast as evidence; the script download alone is insufficient.