How to integrate with Squarespace
To integrate Affiliatly with Squarespace, you need to add two different codes: one for tracking referred visitors and for tracking purchases made by those referred visitors.
To perform the code injections in this guide you'll need to login into your Squarespace dashboard go to:

1. Tracking Visits
<script src="https://static.affiliatly.com/v3/affiliatly.js?affiliatly_code=AF-10XXXX"></script>
Where AF-10XXXX is replaced with your Affiliatly ID, you can find it in the account tab in your Affiliatly dashboard.

Testing the integration (rest of the bullet points)
To test your integration, create a test affiliate for yourself ( from page Affiliates > button "Add affiliate" ) and use their tracking link to open your site ( you can see the tracking link from the details window of the affiliate ).


The tracking link of the test affilate should look like this: https://affiliatlytest.myshopify.com?aff=X
After you open it, please make a test purchase. You should see your visit and purchase (with around of 5 minutes delay) in your Admin panel.

Sample purchase on your Admin panel.


That's it! If you got these two desired results you have confirmed the affiliate tracking on your website.
If you have any more questions and the answers are not available here, please contact us and we will gladly assist you.
2. Tracking purchases
Copy and paste this code at the "Order Confirmation Page" of your Squarespace store:
<script>
var affi_id_order = '{orderId}';
var affi_order_price = '{orderGrandTotal}';
var affi_client_email = '{customerEmailAddress}';
var url_affi = "https://static.affiliatly.com/v3/affiliatly.js?affiliatly_code=AF-10XXXX&conversion=1&id_order="+ encodeURIComponent( affi_id_order ) + "&order_price="+ affi_order_price +"&order_coupons=&client_email=" + affi_client_email;
var script_affi = document.createElement("script");
script_affi.type = "text/javascript";
script_affi.src = url_affi;
document.getElementsByTagName("head")[0].appendChild(script_affi);
</script>
Where AF-10XXXX is replaced with your Affiliatly ID, you can find it in the account tab in your Affiliatly dashboard.

Copy and paste this code at the "Order Status Page" of your Squarespace store:
<script>
var affi_id_order = '{orderId}';
var affi_order_price = '{orderGrandTotal}';
var affi_client_email = '{customerEmailAddress}';
var url_affi = "https://static.affiliatly.com/v3/affiliatly.js?affiliatly_code=AF-10XXXXX&conversion=1&id_order="+ encodeURIComponent( affi_id_order ) + "&order_price="+ affi_order_price +"&order_coupons=&client_email=" + affi_client_email;
var script_affi = document.createElement("script");
script_affi.type = "text/javascript";
script_affi.src = url_affi;
document.getElementsByTagName("head")[0].appendChild(script_affi);
</script>
Where AF-10XXXX is replaced with your Affiliatly ID, you can find it in the account tab in your Affiliatly dashboard.

- Due to restrictions with SquareSpace, the variable {orderGrandTotal} is taking into account discounts to your products, but it is including the shipping value. You can use {orderSubtotal} instead, but that variable is not taking discounts to your products into account while it is excluding shipping value.
- We are not able to track appointments made via the Acuity plugin for Squarespace.
3. API integration (NEW!)
Our Squarespace integration is now making full use of the Squarespace API granting us additional scopes to also provide tracking by Code/SKU/Email and additional functionalities like auto order status update, saving product info and custom commissions.
To set this up, please click on the "Start the integration" button:

Next up, you need to authorize Affiliatly to connect with your Squarespace website:

After allowing the connection you will be redirected back to Affiliatly and will get a confirmation message like this:

You will receive an email from Squarespace confirming the connection with our extension:

Testing the integration (rest of the bullet points)
To test your integration, create a test affiliate for yourself ( from page Affiliates > button "Add affiliate" ) and use their tracking link to open your site ( you can see the tracking link from the details window of the affiliate ).


The tracking link of the test affilate should look like this: https://affiliatlytest.myshopify.com?aff=X
After you open it, please make a test purchase. You should see your visit and purchase (with around of 5 minutes delay) in your Admin panel.

Sample purchase on your Admin panel.


That's it! If you got these two desired results you have confirmed the affiliate tracking on your website.
If you have any more questions and the answers are not available here, please contact us and we will gladly assist you.