Skip to main content

Squarespace Integration

Add Ovyxa analytics to your Squarespace site by injecting a code snippet through the built-in Code Injection feature.

Step 1: Open Code Injection

  1. Log in to your Squarespace site
  2. Go to Settings > Advanced > Code Injection

Step 2: Add the Tracking Script

In the Header section, paste the following:

<script
defer
data-domain="yourdomain.com"
src="https://ovyxa.com/js/script.js"
></script>

Click Save at the top of the page.

That's it -- Ovyxa will now track pageviews across your entire Squarespace site automatically.

Tracking Custom Events

To track button clicks, form submissions, or other interactions, add code via Code Injection > Footer:

<script>
// Track newsletter signups
document.addEventListener('submit', function(e) {
var form = e.target
if (form.classList.contains('newsletter-form')) {
window.ovyxa('event', 'NewsletterSignup', {
props: { location: 'footer' }
})
}
})
</script>

Tracking Squarespace Commerce Events

If you use Squarespace Commerce, track purchases via Footer code injection:

<script>
// Track successful purchases on the order confirmation page
if (window.location.pathname.includes('/commerce/thank-you')) {
window.ovyxa('event', 'Purchase', {
props: { source: 'squarespace-store' }
})
}
</script>

Page-Level Code Injection

To track events on a specific page only:

  1. Open the page in the Squarespace editor
  2. Click the gear icon (Page Settings)
  3. Go to the Advanced tab
  4. Paste your script in the Page Header Code Injection field
  5. Click Save

Cookieless Mode

Add data-cookieless to skip cookie consent requirements:

<script
defer
data-domain="yourdomain.com"
data-cookieless
src="https://ovyxa.com/js/script.js"
></script>

Verify Installation

  1. Save your Code Injection changes
  2. Visit your live Squarespace site (not the editor preview)
  3. Open the browser Network tab and look for ovyxa.com/js/script.js
  4. Check your Ovyxa dashboard to confirm pageviews are appearing

Note: Code Injection is available on Squarespace Business and Commerce plans. The Personal plan does not support it.

Next Steps