Skip to main content

How to Integrate Squarespace with Tapfiliate

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

Gumrah avatar
Written by Gumrah
Updated over a week ago

In this article, we will cover:

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:
    Settings → Advanced → Code Injection → Header

3. Paste the following:

<script src="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" 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.

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:

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. We're happy to help!

Did this answer your question?