Installing Tracking Tag in Squarespace

If you use Squarespace to host your online store, you'll need to correctly install the Perfect Audience site tracking tag and conversion code into your Squarespace settings.

1. Installing the Tag

In your "Manage" menu 
click User Tracking.

This will pull up a page with a javascript tag that looks like this:


Login to your Squarespace store. Click Settings, then Advanced.
 
Then click Code Injection. 
Locate the Footer box.
Paste the site tracking tag in the Footer box. 

Scroll to the top of the page and press Save.

2. Setup Your Conversion Goal

Next, you'll need to add some code to track your conversions.

Login to your Squarespace store. Click Settings, then Advanced.
 
Then click Code Injection. 
Locate the Order Confirmation Page box.

Paste the following code in the Order Confirmation Page box:

<script type="text/javascript">
window._pq = window._pq || [];
_pq.push(['track', 'PurchasedItem', {orderId: "{orderId}", revenue: ({orderSubtotal}])</script>

Optional - You can replace the orderSubtotal variable with one if the following alternate methods of calculating the order total:
  • {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
Scroll to the top of the page and Save. Back in Perfect Audience, click Manage-> Create Conversion. Use the following settings:



Then save the conversion goal. 

Wait for the e-mail! Now that your tag is on your Squarespace store, you will receive an e-mail when our system starts seeing data. You can also check back to the Site Tracking Tag page to see if data is being recived. This usually takes an hour or two. If you don't get an e-mail or see data on your tag page or Audiences page, double check that you've placed the tag in your web site code and pushed that code live. It can be easy to forget a simple step in there along the way.

If you have any problems, email support@perfectaudience.com

Feedback and Knowledge Base