Squarespace
Paste one script into Squarespace Code Injection and every page records visits in Databuddy.
Add the script
Open Code Injection
In your website's Settings, find Code Injection. Its location depends on your Squarespace version, and it isn't on every plan.
Paste the script into Footer
<script
src="https://cdn.databuddy.cc/databuddy.js"
data-client-id="YOUR_CLIENT_ID"
data-track-attributes
crossorigin="anonymous"
async
></script>Your Client ID is in the Databuddy dashboard under your website's Settings → General. Choose Save.
Check it works
Open your website in a private window and visit a few pages. They appear on your dashboard.
Track a button click
With data-track-attributes on, add a Code block to a page and name the element:
<a href="/pricing" data-track="pricing_link_click" data-location="header">View pricing</a>Each click sends a pricing_link_click event with location: "header".
Track form submissions
Add this to Code Injection → Footer, after the Databuddy script:
<script>
document.addEventListener("submit", function (event) {
var form = event.target.closest("form");
if (!form) return;
window.databuddy?.track("form_submit", {
form_id: form.id || "unknown",
page_path: window.location.pathname,
});
});
</script>This counts every submit attempt, including ones that fail validation.
Turn on more tracking
Add attributes to the script tag:
data-track-outgoing-links
data-track-web-vitals
data-track-errorsRelated
How is this guide?