Using the Feathr Super Pixel and a custom update script, you can track purchases from SquareSpace and pass them into Feathr. This allows you to build segments from your SquareSpace site visitors based on URL, as well as segments based on purchases made by your visitors. 

Before we get started, make sure to follow the directions for adding the Super Pixel to your SquareSpace site in the article "How to Add the Super Pixel to SquareSpace" first.

How to Add a Custom Update Script to SquareSpace to Track Purchases

1. In your SquareSpace account, open the menu and select Settings > Advanced > Code Injection.

2. Navigate to the Order Confirmation Page section. 

3. This is where we will add the custom update script

*Note: You need your Super Pixel already in place in your SquareSpace footer in order for this custom update script to work. See this article: How to Add the Super Pixel to SquareSpace

You can see there are six tags available that you can use to insert information specific to the customer:

  • {orderId} – The unique ID of the confirmed order
  • {orderSubtotal} – The subtotal of the confirmed order
  • {orderSubtotalCents} – The subtotal of the confirmed order, in cents
  • {orderGrandTotal} – The grand total of the confirmed order
  • {orderGrandTotalCents} – The grand total of the confirmed order, in cents
  • {customerEmailAddress} – The customer's email address, as it was entered in the "Billing Info" section

4. To build your custom update script, choose the tags you wish to track in Feathr. For this example, let's use email address, grand total, and order ID. That code would look like this:

feathr('update', {
    "email": {customerEmailAddress},
    "ORDER_TOTAL": {orderGrandTotal},
    "ORDER_ID": {orderId},

5. Copy and paste the code into the Order Confirmation Page section. 

6. Be sure to click save when you're finished! 

7. Now, when someone makes a purchase in SquareSpace, the information you selected to track (in the above example, it was email address, grand total, and order ID) will pull into Feathr. When building a segment, you can filter on this information using the "attribute" filter.

Checking Your Super Pixel and Custom Update Script

If your Super Pixel and custom update script are written and placed correctly, it will look like this in your website code: 

You can see the Feathr Super Pixel (highlighted in light blue), and the custom update script (highlighted in yellow), which captured the email address, order grand total, and order ID of the purchase. Remember, the custom update script will only appear on Order Confirmation Pages.

How to Build a Segment Using Your Custom Update Information

To build a segment based on the information captured by the custom update script, follow these steps:

  1. Login to Feathr and navigate to the Segments section.
  2. Click on "Add Segment" in the top right corner. 
  3. Name your segment - let's call this one "Tracked Purchases."
  4. Select "Attribute" in the 'type' section, then search for Order Total in the 'attributes' section. Your custom update tag will appear here. 
  5. Select your 'comparison type' in the third section. To create a segment of purchases, select "exists" here. This will pull in anyone who has any order total associated with their Person.

6. Click Save in the bottom right corner. You're done!

Common Questions

Why should I use the 'update' script and not the 'sprinkle' script?
You can technically use either one. However, the update script is typically used for People Attributes, and for information that doesn't change, like Name and Email, for example. The sprinkle script is used to send Feathr data about what those people do, and is filtered as an activity (rather than an attribute). Also, using a sprinkle will require a bit more code, so using the update script is simpler! Reach out to [email protected] or ask your dedicated Customer Success Manager for help if you'd prefer to use the sprinkle script. 

Why can't I find the attribute in my segment filter?
Updating the code on SquareSpace, or any site for that matter, will take a little while to pull through into Feathr. As long as you checked that your code is firing correctly (see above example under Checking Your Super Pixel and Custom Update Script), the information will start pulling into Feathr in a few hours! 

Did this answer your question?