Tapfiliate and Squarespace Scheduling (Acuity) integration

If you are a business owner, you must have heard about Affiliate marketing, a way to promote your business through 3rd party marketers and get them rewarded for every purchase they help make. There are countless tools to make affiliate ease of mind for you, and Tapfiliate is one of them. In this post, I will explain how I was helping a Squarespace website owner automate their Acuity Purchase with Tapfiliate

The problem

Acuity allows you to sell your business online. Unfortunately, there is no built-in affiliate for the tool, either from Acuity itself or Squarespace (Acuity has been merged with Squarespace Scheduling), so Tapfiliate comes to the rescue. For this particular project, a coach who sell their retreat plan on Acuity wanted to map the Taffiliateโ€™s Commission Type to each Acuity purchase, which means different products are matched with different commission types (different off percentage, for example).

The integration process is quite similar to other Affiliate services

  • You need to place click tracking code to Squarespace Code Injection (link)

  • To signal the successful conversion ( eg: a purchase made ), you need a conversion page code

While the first step is handy by simple copy and pasting the given code, the next step with conversion tracking is a bit challenging

  • Acuity purchase did not land on Squarespace post order page, Acuity has its own infrastructure and is embedded into Squarespace as Iframe

  • Not all product has the same commission type, meaning in the same order, we need to cross-reference the commission of each product and fire a conversionMulti trigger

Solution

  • Tracking conversion on post order page

Website structure

As described in the above diagram, Acuity block is placed inside an iframe, therefore the conversion tracking can not be called directly from Squarespace injection. Luckily for us, the Acuity frame has its own tracking code injection in the order page, so I make it emit an event to the parent window with the event name order.created, which is how I can grab the reference of the Acuity order via %id% merge tag.

  • Mapping commission types for products

The next challenge is to collect the Acuity products ( line items ) in the order and map it with the correct commission type on Tapfiliate. Since Squarespace did not allow users to use the platform backend, we need to find a place to trigger the API call and store the secret token to prevent it from being exposed to users in the browser, for this matter I use Autocode as a dedicated backend since it has generous free tier plan with 10,000 API calls per month.

So as soon as Acuity triggers the order.created event, the Autocode webhook is called to find the details of the line items and map its name with the Tapfililate commission type. The rest issue is now easier as it will need to trigger conversionMulti accordingly

Trigger conversionMulti on Acuity post purchase

NL

am frontend dev that provide solutions to enhance feature of squarespace.com can't provide, such as:

- Connect Google Spreadsheet dataset to Squarespace Google Maps or Datatables

- Implement SVG, CSS animations

- Inject custom code to display currency conversion based on geolocation

- Edit squarespace template file in Developer mode

--- To Space And Beyond! ---

Previous
Previous

Adding Squarespace Code Injection: Comprehensive Guide

Next
Next

Into the deep (zoom)