Squarespace
Add Rybbit analytics to your Squarespace site
Squarespace injects custom HTML into every page through its Code Injection panel, so no template edits are needed.
Code Injection is available on the Business and Commerce plans. It is not available on the Personal plan.
Get your tracking snippet
In your Rybbit dashboard, open Site Settings → Tracking Script and copy your snippet. It looks like this:
<script src="https://app.rybbit.io/api/script.js?siteId=YOUR_SITE_ID" defer></script>YOUR_SITE_ID is the numeric ID of your site. If you self-host Rybbit, app.rybbit.io is the domain of your own instance.
Add the snippet to Squarespace
- From the Home Menu, open Settings.
- Open Website, then Code Injection (listed under Advanced or Developer depending on your Squarespace version).
- Paste the snippet into the Header field. The script is deferred, so it does not delay page rendering.
- Click Save at the top of the panel.
The Footer field also works and loads the script on every page. Leave the Lock Page and Order Confirmation Page fields alone; they only apply to those single pages.
Verify installation
Open your live site in a new tab and click through a few pages. Within a few seconds the pageviews appear in the Rybbit dashboard.
If nothing shows up:
- View the page source and search for
script.js?siteId=to confirm the snippet is on the page. - Open the browser Network tab and check that
script.jsreturns200and thatPOSTrequests go to/api/track. - Disable ad blockers, or set up a proxy so the script loads from your own domain.
- See the script troubleshooting guide for other common causes.
Troubleshooting
- Code Injection is missing from Settings: the site is on the Personal plan. Upgrade to Business or Commerce.
- Only the checkout is tracked: the snippet was pasted into Order Confirmation Page instead of Header or Footer.
Next steps
- Track custom events such as signups, purchases and button clicks.
- Identify users to connect sessions to accounts.
- Proxy the script through your own domain to bypass ad blockers.
- Script attributes let you skip or mask URLs and tag events.