Skip to main content
All CollectionsSales TrackingPixel Tracking
How can I add a tracking pixel to my e-commerce store?
How can I add a tracking pixel to my e-commerce store?

How to add a sales pixel to your Shopify or e-commerce store to track link conversions

Simma Baghbanbashi avatar
Written by Simma Baghbanbashi
Updated over 7 months ago

If you're using an Image Pixel or iFrame Pixel as your conversion tracking method, you'll need to add a pixel to your e-commerce store in order for Aspire to capture the conversions generated from your members' tracking links.

In this article, we'll walk you through how to add a pixel to your e-commerce store using Shopify as an example. Watch the video below or keep reading to learn more!

What is a pixel and how does this work?

A pixel is a snippet of code that you will place on your website's order confirmation page. When a customer clicks on a member's link and purchases something, the pixel will load and communicate the conversion and sales amount back to Aspire.

Aspire then associates the sale with your offer and member. Aspire only receives sales data from customers that click on an Aspire-generated tracking link.

How do I add a pixel to my store?

Once you create a link tracking offer, go to Reporting > Sales Tracking and click on the offer. Then, click "Instructions" below the offer name.

On this page, you will see a snippet of code called a pixel that looks like this:

Directions:

1. In order to track a sales amount, you need to replace the word "AMOUNT" with your store's value for the order subtotal amount. An example value for Shopify brands would be {{ line_items_subtotal_price | money_without_currency }}.

Advanced Options:

  • By default, Aspire only tracks the first conversion for a customer within a 28-day window. What this does is ensure we don't track page reloads as a second purchase (i.e. the customer goes back to the order confirmation page to check their order status). However, you can also add logic as recommended by Shopify here. This is optional because Aspire already prevents duplicates.

2. Copy the final version of your pixel.


3. Log in to your Shopify store and click "Settings" in the bottom left-hand corner.

4. Click on "Checkout and accounts".

5. Scroll down until you see "Order Status Page", then paste the final version of your code into the box below "Additional scripts".

6. Click Save, and you're done!

πŸ“Œ Important note: If your store has installed an app that adds a post-purchase page to your store's checkout, then any custom pixel tracking that you use on your store might not capture certain tracking events. Custom tracking pixels that are added to your store's Additional scripts box track events on only the order status page, which comes after the post-purchase page in the checkout. If a customer leaves your store on the post-purchase page, then no events on the order status page are tracked.

To ensure that you capture conversion events properly, you can add a script that tracks events on the post-purchase page. To do this, grab the pixel you copied above and paste it into the box below "Post-purchase Page".

6. Once you have added the pixel, we recommend placing a test order to make sure it’s properly set up. See this article to learn how.

For further information, check out this documentation from Shopify or reach out to our Support team at [email protected].



Not using Shopify?

No worries! πŸ‘ Once you have edited your pixel to replace AMOUNT with your store's tag for order or sale amount, place the final pixel on whatever page indicates that a user has completed a conversion, such as completing a purchase or filling out a form.

Did this answer your question?