Skip to main content
Tracking script - AST troubleshooting
Updated over a month ago

You've installed our sales tracking script, but it's not working? Let's check that it's correctly installed.

IMPORTANT

Before checking the installation, please make sure you have correctly installed the tracking script on your e-commerce site: 🔗 Upfluence sales tracking for any Website

First of all, make sure you are testing with the correct link:

The affiliate link to track sales can be found on your Campaign dashboard - Affiliate links column.

🪄 Check that the first script is correctly installed and loaded

The first script must be installed in the <head> of all pages. To check that it is correctly installed:

  • Go to the home page of your e-commerce site

  • Right-click, then click on “Inspect”

  • Click on “Elements” and check that the installed script is visible.

  • Click on “Sources” and check that the script is visible/loaded.

If the above elements are confirmed, we can move to the next step. If not, please make sure the script is properly installed and be able to see the script displayed/loaded.


🛍️ Check that the second script is correctly installed and triggered

Script installation

The second script is triggered when a sale is made with an affiliate link.

  • First, make sure the script is installed on the sales confirmation page. Preferably in the <body> section

Important: The “Send orders” script must always be installed AFTER the “Load the script” script.

  • Make sure that the values have been replaced according to your e-commerce store.

Note:

  • You can easily find the variables to be replaced in your CMS documentation by searching for “script variables”.

  • We have script templates for the following CMS and services:

Script trigger

Start by creating an affiliate link linked to your tracking script. Please, read this article to know more: 🔗 How to add discount codes or affiliate links

This is a pre-requisit to test the system.

  • Click on your affiliate link. You should be redirected to your store.

  • Add products in your cart

  • As before, right click and click on “Inspect

  • Add products to your cart and confirm your order. You will be redirected to the order confirmation page.

  • Click on “Network”, then select “Fetch/XHR

  • You should see a “Fetch” event that has the same value as the script installed during the 1st step.

Now there are two possible scenarios:

1️⃣ You see the “Fetch” event :

  • This means that the script has been triggered

  • You can check that the information is correct by clicking on the “Fetch” event, then select Payload. You'll see all the information gathered and linked to the order event

  • If there's one required information missing, we won't consider the order. Please, make sure there's data available for all the required data:

    • order_name

    • order_id

    • amount

    • currency

  • Correct the wrong information by updating the values in the "Send orders" script installed

  • Refresh the page and see if the values are now properly replaced

2️⃣ You CAN'T see the “Fetch” event :

This means an information is missing from your "Send orders" script

  • Click on "Sources" and look for your page's code in the list. Click on it. You should see your page's source code.

  • Identify your "Send orders" script in the source code.

Note: You can perform a search containing "upf.push” to find it easily.

  • Identify the problem. Most of the time, there's a 🔴 icon on the right of the impacted data. In this example, the "order_id" was missing a single quote '

  • Correct the wrong information by updating the values in the "Send orders" script installed

Important:

Missing information issues can be linked to multiple reasons:

  • Missing value

  • Missing quotes

  • String value instead of Number value

  • Refresh the page and see if the values are now properly replaced

Did this answer your question?