Skip to main content
Free3 minutesBeginner

Squarespace Integration

Add Zenovay analytics to your Squarespace site through Settings → Advanced → Code Injection → Header. Requires Business plan or higher.

squarespacecmsno-codeintegrationtracking-script
Last updated:

Add Zenovay to your Squarespace site through the Code Injection panel. It works on every Squarespace template and is the supported approach for any analytics or marketing tag.

Code Injection requires a Business plan or higher ($23/mo+). Personal plans do not expose Code Injection.

Quick Start

  1. Copy your tracking snippet from the Zenovay dashboard.
  2. In your Squarespace admin, open Settings → Advanced → Code Injection.
  3. Paste the snippet into Header.
  4. Click Save at the top of the panel.

Installation

  1. Log in to your Squarespace admin.
  2. From the home menu, click Settings.
  3. Scroll down and click Advanced.
  4. Click Code Injection.
  5. Paste this snippet into the Header box:
<script defer data-tracking-code="YOUR_TRACKING_CODE" src="https://api.zenovay.com/z.js"></script>
  1. Click Save at the top of the panel.

Per-page Code Injection

For tracking specific pages only:

  1. Hover over the page in the Pages panel.
  2. Click the gear icon → Page Settings.
  3. Open the Advanced tab.
  4. Paste the snippet into Page Header Code Injection.
  5. Save.

Per-page code is appended after site-wide code. Don't paste in both scopes.

Verify your installation

  1. Open your live site in an incognito window.
  2. View source and look for <script defer data-tracking-code=...> in the <head>.
  3. Check the Zenovay real-time view — your visit appears within ~30 seconds.

Tracking Squarespace Commerce purchases

For Squarespace Commerce stores, add a purchase event on the Order Confirmation page:

  1. Go to Settings → Advanced → Code Injection.
  2. Paste into the Order Confirmation Page box (not the regular Header):
<script>
  document.addEventListener('DOMContentLoaded', () => {
    const orderId = document.querySelector('[data-order-id]')?.dataset.orderId
                 || window.location.pathname.split('/').pop();
    const total = document.querySelector('.order-total .price')?.textContent;
    const revenue = parseFloat((total || '').replace(/[^0-9.]/g, ''));
    if (window.zenovay && revenue > 0) {
      window.zenovay('track', 'purchase', {
        transaction_id: orderId,
        revenue,
        currency: 'USD',
      });
    }
  });
</script>

For higher accuracy use server-side Stripe webhooks instead.

Tracking form submissions

Squarespace native forms emit standard submit events:

<script>
  document.addEventListener('DOMContentLoaded', () => {
    document.querySelectorAll('form[data-form-id]').forEach(form => {
      form.addEventListener('submit', () => {
        window.zenovay?.('track', 'form_submitted', {
          form_id: form.getAttribute('data-form-id'),
        });
      });
    });
  });
</script>

Identify Squarespace Members

If you use Squarespace Member Areas:

<script>
  document.addEventListener('DOMContentLoaded', () => {
    const ctx = window.SquarespaceMemberAccountContext?.context;
    if (ctx?.memberId && window.zenovay) {
      window.zenovay('identify', {
        userId: ctx.memberId,
        email: ctx.emailAddress,
      });
    }
  });
</script>

Troubleshooting

No data, "Code Injection" not visible. You're on a Personal plan. Upgrade to Business ($23/mo) or higher.

Snippet pasted but no data. Make sure you clicked Save at the top of the Code Injection panel — Squarespace doesn't autosave this field.

No data on blog posts. Squarespace serves AMP variants on blog posts (/?format=amp). AMP strips arbitrary scripts. Disable AMP in Settings → Marketing → SEO or accept the AMP gap.

Double pageviews on Brine/Native templates. A few older templates use AJAX page transitions. Manually call window.zenovay('trackPageView') from a popstate listener if you see undercounted views.

Plan requirements

PlanCode InjectionCommerce events
Personal
Business⚠️ Limited
Basic Commerce
Advanced Commerce✅ + abandoned cart

Privacy

For cookieless tracking add data-cookieless="true":

<script defer
        data-tracking-code="YOUR_TRACKING_CODE"
        data-cookieless="true"
        src="https://api.zenovay.com/z.js"></script>

Next steps

Was this article helpful?