Skip to main content
Upfluence sales tracking (AST) - Squarespace template

Track influencer-driven sales and run affiliate marketing campaigns

Updated this week

Upfluence enables you to track sales on your Squarespace eCommerce store and run affiliate marketing campaigns, allowing you to collaborate with influencers and compensate them based on sales.

This guide walks you through installing Upfluence’s sales tracking system on Squarespace.

💡 If you haven’t set up the general tracking script yet, check out our Upfluence sales tracking guide for all CMS.

Step 1: Generate your tracking script

  1. Go to Upfluence > Integrations > Tracking for Any Website.

  2. Click "+ Add script".

  3. Enter the following details:

    • Tracking script name: Choose a clear name for identification.

    • E-commerce platform: Pick Squarespace.

  4. Click "Generate script" to receive your custom tracking script.

💡 Copy your script to a notepad — you may need to modify some values.

Step 2: Install the first script (tracking visits)

This script identifies users who click on affiliate links and attributes sales accordingly.

How to install the first script in Squarespace

  1. Log in to your Squarespace admin panel.

  2. Go to Settings > Advanced > Code Injection.

  3. Find the "HEADER" script section. Paste the first script (Step 1 - Load the script) from Upfluence here.

  4. Click Save to confirm the changes.

Now that the first script is installed, let’s install the second one!

Step 3: Install the order tracking script on the order confirmation page

This script tracks successful purchases and sends order data to Upfluence.

How to install the second script in Squarespace

  1. In Settings > Advanced > Code Injection, find the "ORDER CONFIRMATION PAGE" script section.

  2. Copy and paste the following script:

    htmlCopyEdit<script> _upf.push([ [ 'order', { 'order_id': '{orderId}', // required 'order_name': '{orderId}', // required 'amount': '{orderSubtotal}', // required 'currency': 'EUR', // required customer: { email: '{customerEmailAddress}' } } ] ]); </script>

  3. Click Save to confirm the changes.

You should now have two scripts installed:

  1. The first script (tracking visits) in the "HEADER" section

  2. The second script (tracking orders) in the "ORDER CONFIRMATION PAGE" section

Step 4: Test your installation

Run a test order:

  1. Use an affiliate link copied from Upfluence to visit your store.

  2. Add products to your cart and complete a test purchase.

  3. Check if the order data appears in Upfluence:

    • Go to "Network" > "Fetch/XHR" in the browser inspector.

    • Look for the "Fetch" event" and check that all required fields (order_id, amount, currency, etc.) are correctly sent.

If everything is working, you're ready to start tracking sales!


Variable Descriptions

Variable

Description

{orderId}

The order number of the confirmed order

{orderSubtotal}

The subtotal of the confirmed order

{customerEmailAddress}

The customer's email address, as they enter it in the “Your Email” section at checkout

Did this answer your question?