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.
<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.
To test out the integration you can add ?aff=1 at the end of your store's URL and see if the visit gets tracked on your dashboard.
<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 allowing us 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:
To test your integration, open your site with parameter "?aff=1" (the ID of the test affiliate):
https://yourstoreurl.squarespace.com/?aff=1
And make a test purchase. You should see your visit and purchase (with around of 5 minutes delay) in your Admin panel.