Know what must work before you launch
Use code injection for the landing page and prove the checkout separately
- Best fit
- Teams evaluating AffiliateBase for a Squarespace affiliate workflow.
- Checkout handoff
- The checkout path must receive the generated AffiliateBase referral ID.
- Proof required
- Complete one referred checkout and confirm the attributed sale and commission.
Follow the attribution evidence
Illustrative scenario · fictional values
-
Referred visit
?via=partner
AffiliateBase captures the visit and generates a referral record.
-
Checkout handoff
referral ID
The checkout must carry the generated identifier into Stripe.
-
Paid event
$99 paid
A supported Stripe event confirms the attributed payment.
-
Commission
$19.80 due
An eligible attributed sale creates the commission record.
-
Payout prep
Payout ready
Review the commission and prepare the next step with your payout provider.
This guide is for Squarespace merchants running an affiliate program for their own offers. It is not an application guide for Squarespace’s company affiliate program.
You need a Squarespace plan and permissions that allow code injection, plus a published page where the tracking script runs. Code on a sales page does not establish access to Squarespace Commerce checkout.
Treat native Squarespace checkout as unverified. A supported path uses a Stripe Payment Link or Buy Button on the same tracked page, followed by the AffiliateBase checkout verification.
Follow these steps to integrate AffiliateBase with your Squarespace site:
Add the Tracking Script
Add the AffiliateBase tracking script to your Squarespace site. Navigate to Settings > Advanced > Code Injection and paste this script in the Header section.
Use the pinned jsDelivr tracking URL for the latest published AffiliateBase release.
<script async src="https://app.affiliatebase.io/track.js" data-account-id="YOUR_ACCOUNT_ID"></script>Use Stripe Payment Links or Buttons (Optional)
If you're using Stripe Payment Links or Buy Buttons on your Squarespace site, add the tracking script on the same page so AffiliateBase can pass the generated referral ID.
<!-- Keep Stripe checkout elements on the same page as the AffiliateBase script. -->
<a href="https://buy.stripe.com/xxxxx">Buy now</a>
<stripe-pricing-table
pricing-table-id="prctbl_xxx"
publishable-key="pk_live_xxx"
></stripe-pricing-table>
<!-- For custom or redirected Stripe-hosted links, opt in explicitly. -->
<a data-affiliatebase href="https://link.payment/xxxxx">Buy now</a>Track Form Submissions (Optional)
Add data-affiliatebase="true" to forms to auto-inject the referral ID.
Add this script to Code Injection > Footer to track form submissions.
<!-- Add to Code Injection > Footer -->
<script>
document.addEventListener('DOMContentLoaded', function() {
// Auto-inject referral ID into Squarespace forms
const forms = document.querySelectorAll('form[data-form-id]');
forms.forEach(form => {
const referralId = window.AffiliateBase?.referral || '';
if (referralId) {
const hiddenInput = document.createElement('input');
hiddenInput.type = 'hidden';
hiddenInput.name = 'affiliatebase_referral';
hiddenInput.value = referralId;
form.appendChild(hiddenInput);
}
});
});
</script>Test Your Integration
Visit your Squarespace site with a test affiliate link and verify tracking is working.
// Visit your site with a test affiliate link:
// Open the exact setup-test link shown in AffiliateBase.
// Open browser console and check:
console.log(window.AffiliateBase?.referral); // Should show a generated referral IDWhy Use AffiliateBase with Squarespace?
Squarespace can host the landing-page script; the payment path still needs a separate compatibility test.
No-Code Integration
Add affiliate tracking using Squarespace's code injection feature without complex development.
Form Integration
Track conversions from Squarespace forms, including contact forms and newsletter sign-ups.
Stripe Integration
Use a Stripe Payment Link or Buy Button on the same tracked page, then verify the completed checkout carries the generated referral ID.
Easy Setup
Simple code injection setup that works with any Squarespace template.
Frequently Asked Questions
Do I need to know how to code to use AffiliateBase with Squarespace?
Can I track conversions from Squarespace forms?
Does AffiliateBase work with Stripe on Squarespace?
What tracking parameters does AffiliateBase support?
Related Platform Guides
Create an Affiliate Program for Your Wix Site
Evaluate AffiliateBase on Wix: custom-code prerequisites, supported Stripe checkout options, Wix Stores limits, and end-to-end verification.
Create an Affiliate Program with Webflow
Add affiliate tracking to a published Webflow site, pair it with a supported Stripe checkout, and verify referral attribution before launch.
Create an Affiliate Program with WordPress
Install AffiliateBase on WordPress, choose a supported Stripe checkout, and verify referral attribution without assuming WooCommerce or plugin compatibility.
Ready to Launch Your Squarespace Affiliate Program?
Get started with AffiliateBase today and start growing your Squarespace site with affiliate marketing.