Skip to main content
Squarespace is a good AgentRef fit for marketing pages and hosted Stripe surfaces. As with other website builders, the important distinction is whether Squarespace only renders the page or also owns the checkout.

Before you start

  • Set the program website in AgentRef to the same root domain as your Squarespace site.
  • Copy the exact script snippet from Settings -> Integration.
  • If checkout begins on another subdomain, install AgentRef there too.

Install the script with code injection

  1. Open your Squarespace site dashboard.
  2. Go to Settings -> Developer Tools -> Code Injection.
  3. Paste the AgentRef script into the Header field.
<script
  defer
  src="https://www.agentref.co/api/tracking/script.js?pid=YOUR_PROGRAM_ID"
></script>
  1. Save the change.
Squarespace code injection is typically available on Business plans and higher.

Checkout compatibility on Squarespace

FlowStatus with AgentRef
Stripe Payment Links, Buy Buttons, or Pricing Tables embedded on Squarespace pagesSupported directly.
Custom Stripe checkout outside Squarespace CommerceSupported with the Stripe guide.
Squarespace-native commerce checkoutNot an automatic AgentRef attribution surface today.
  • Shared subdomains under one root can work well if AgentRef is installed on every surface that starts the journey.
  • Different root domains do not share first-party cookies automatically.
  • If you use a consent banner, call window.AgentRef.setConsent('granted') after opt-in.

Verify the installation

1

Open a live referral visit

Use a real affiliate link on the published Squarespace domain.
2

Confirm cookies

Check for agentref_cid and agentref_pid in DevTools.
3

Use debug mode

Add ?agentref_debug=1 and inspect the console.
4

Validate your checkout path

If you use anything beyond hosted Stripe surfaces, follow the Stripe guide.

Troubleshooting

  • The script is saved but cookies never appear: confirm the published domain matches the website configured in AgentRef.
  • Clicks exist but conversions do not: Squarespace Commerce native checkout is not an automatic AgentRef conversion path.
  • The flow crosses into another domain: first-party cookies will not move across root domains without a deliberate handoff.

Stripe Checkout

Required for custom Squarespace-to-Stripe flows.

How Tracking Works

Understand the full click-to-conversion pipeline.

Consent and GDPR

Coordinate AgentRef with your privacy banner.