Add referral tracking to your Squarespace site using Code Injection. This feature requires a Business plan or higher.
Plan requirement
Code Injection is only available on Squarespace Business plan or higher. If you're on a Personal plan, you'll need to upgrade to add custom tracking code.
In your Squarespace dashboard, go to Settings → Developer Tools → Code Injection.
Paste this script in the "Header" text area. This will add the script to every page on your site.
<script
async
src="https://js.blossu.com/v1/blossu.js"
data-program-id="YOUR_PROGRAM_ID"
></script>Replace YOUR_PROGRAM_ID with your actual program ID from the Blossu dashboard.
Click Save at the top of the page.
To verify the installation:
Visit your site with a test referral link (e.g., yoursite.squarespace.com?via=test)
Open your browser's developer console
Check if window.blossu_ref_id is defined
When a visitor arrives via a partner referral link, the script captures the referral and stores it as a first-party cookie. This persists for 60 days and is used to attribute any conversions to the referring partner.
Now that you have tracking set up, you need to connect your payment platform to automatically track conversions and calculate partner commissions.
Next article
How to track affiliates and revenue with Stripe