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
- Log in to your Squarespace site
- 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:
- Open the page in the Squarespace editor
- Click the gear icon (Page Settings)
- Go to the Advanced tab
- Paste your script in the Page Header Code Injection field
- 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
- Save your Code Injection changes
- Visit your live Squarespace site (not the editor preview)
- Open the browser Network tab and look for
ovyxa.com/js/script.js - 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.