> ## Documentation Index
> Fetch the complete documentation index at: https://support.tapfiliate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Integrate Squarespace with Tapfiliate

> This guide walks you through connecting your Squarespace site with Tapfiliate.

September 16, 2026

In this article, we will cover:

* [Why Squarespace is a powerful integration for Tapfiliate](#h_bef9641bfd)
* [What you need before starting the integration](#h_8c0e97f43b)
* [Step-by-step setup](#h_2692a919e5)
* [How to validate your Squarespace tracking](#h_67637de30e)
* [How to improve tracking and best practices](#h_7a13a699c1)
* [Advanced optional features](#h_172c1a3c53)

## Squarespace Integration Overview

Our Tapfiliate tracking solution allows you to seamlessly integrate affiliate tracking into your Squarespace store. With just a few code snippets added via Code Injection, you’ll be able to track clicks, attribute affiliate-driven purchases, automate commission calculations, and monitor performance in real time.\

With this Squarespace integration, you can:

* Track affiliate-driven purchases in your Squarespace Commerce store
* Automatically attribute commissions based on total order amount
* Enable lifetime commissions for returning customer attribution
* Monitor affiliate performance in real time

A few things to know:

* You need a Squarespace Business or Commerce plan to access Code Injection
* The integration relies on the standard Squarespace checkout process
* Lifetime commissions only work if enabled inside your Tapfiliate account

## Prerequisites before starting Integration

Before you start, make sure you have:

* A Tapfiliate account (with access to your Account ID and tracking script)
* A Squarespace **Business** or **Commerce** plan
* Access to **Settings → Advanced → Code Injection**

## Integration Steps to be completed

**Step 1: Add the Tapfiliate Tracking Script**

1. In your Tapfiliate dashboard, go to **Integrations → Squarespace** and copy the tracking code.
2. In Squarespace, navigate to:\
   &#x20;**Settings → Advanced → Code Injection → Header**

![](https://mintcdn.com/tapfiliate-help/1iW9-M7MOhKRwS9v/images/1693887/01-7a774921-5c45-4dbc-bf5a-fc305c8d3e5c.png?fit=max\&auto=format\&n=1iW9-M7MOhKRwS9v\&q=85\&s=93e24ceed0c61d9966fd7dc6d484927a)

3\. Paste the following:\

`<script src="`[https://script.tapfiliate.com/tapfiliate.js](https://script.tapfiliate.com/tapfiliate.js)`" type="text/javascript" async></script>`\

`<script type="text/javascript">`\

`(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){`\

`(t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');`\

`tap('create', 'YOUR ACCOUNT ID', { integration: "squarespace" });`\

`tap('detect');`\

`</script>`\

Replace **YOUR ACCOUNT ID** with your Tapfiliate account ID.\

4\. Click **Save**.\

**Step 2: Add the Conversion Tracking Script**

1. In the same **Code Injection** page, scroll to the **Order Status Page** and **Order Confirmation Page** fields.
2. Paste the following snippet into both fields:

`<script src="`[https://script.tapfiliate.com/tapfiliate.js](https://script.tapfiliate.com/tapfiliate.js)`" type="text/javascript" async></script>`\

`<script type="text/javascript">`\

`(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){`\

`(t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');`\

`tap('create', 'YOUR ACCOUNT ID', { integration: "squarespace" });`\

`tap('conversion', '{orderId}', {orderSubtotal}, {'customer_id': '{customerEmailAddress}'});`\

`</script>`\

Replace **YOUR ACCOUNT ID** with your Tapfiliate account ID.\

*Note: Our code is set up to retrieve the order’s subtotal (amount before discounts, taxes & shipping). If you’d prefer to retrieve the Order’s Grand total (amount after discounts, taxes & shipping is applied), replace the \{orderSubtotal} tag with \{orderGrandTotal}.*\

3\. Save your changes.

## How to Validate your squarespace Integration

To confirm the squarespace tracking works correctly:

1. Create or use an existing affiliate link.
2. Visit your site through that link.
3. Complete a test purchase.
4. In Tapfiliate, confirm that:
   * A click has been recorded
   * A conversion has been tracked
   * Order ID, amount, and customer email are correct
   * If lifetime commissions are enabled, the customer\_id displays correctly

You can check out the detailed tracking validation article by [clicking here.](https://support.tapfiliate.com/integrations/test-your-integration/how-to-validate-your-tracking.md)\

If anything fails to appear, double-check that your scripts are placed in the correct Code Injection slots.\

***Note:*** *On **Squarespace 7.1**, the product name is **not passed automatically** to third-party tools. As a result, affiliate-tracking platforms like Tapfiliate will not receive the product name by default when a purchase is made.*

## How to Improve Tracking & Best Practices

* **Enable lifetime commissions** if you want affiliates to earn from returning customers.
* **Test your integration** before launching your affiliate program live.
* Ensure your **Squarespace plan supports Code Injection**.
* Avoid heavy checkout customizations that may bypass the Order Confirmation page.

## Advanced or Optional Features for Squarespace

**1. Lifetime Commissions**\

Tapfiliate’s conversion snippet includes the \{customerEmailAddress} placeholder, allowing Tapfiliate to recognize returning customers and automatically attribute future purchases to the same affiliate (if lifetime commissions are enabled).\

**2. Additional Customization**\

If you need to track additional metadata, implement custom commission logic, or pass extra fields into Tapfiliate, you may require a developer to extend your tracking setup.\

**3. Squarespace + MoonClerk Integration (Optional Dual Setup)**\

If you use **MoonClerk** to process payments while hosting your site on Squarespace, you can set up Tapfiliate tracking across both platforms.\

Follow these steps **after your Squarespace integration is complete**:\

**Step 1: Complete All Squarespace Steps First**\

Ensure the global Tapfiliate tracking script and conversion scripts are installed exactly as described in this guide.\

**Step 2: Configure Redirect in MoonClerk**\

Inside your MoonClerk payment form:

1. Open the form settings
2. Scroll to **Confirmation**
3. Choose **"Redirect to another webpage"**
4. Add your success page URL and append MoonClerk variables:

[https://your-site.com/success?payment\_id=#\{\{payment\_id}}\&amount=#\{\{amount}}\&customer\_id=#\{\{customer\_id}}](https://your-site.com/success?payment_id=#\{\{payment_id}}\&amount=#\{\{amount}}\&customer_id=#\{\{customer_id}})\

MoonClerk will automatically replace the placeholders with payment details, allowing Tapfiliate to track the transaction based on the data passed through the URL parameters.\

**Step 3: Connect your Stripe account**\

Once you have added the relevant codes, you can directly connect your moonclerk account with Tapfiliate account via stripe.

## Key Notes

* Scripts must be placed precisely in the Header and Order Status/Confirmation sections.
* Always run a full test before inviting affiliates.
* Caching tools or blockers can interfere with tracking.

**Need More Help?**\

If you have questions or need assistance, feel free to contact us at **[support@tapfiliate.com](mailto:support@tapfiliate.com)**. We're happy to help!


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.