1. First, go to the code editor and find the file named 'thank_you.html'. It should look something like this:
2. This is the page that is displayed once a customer has successfully checked out, so at this point we have access to their order information which we will need in this step.
You will need four things to setup the tracking pixel.
What you need: | How to get it: |
Order subtotal | {{ order.total_price * 0.01 }} |
Tracking number | {{ order.id }} |
Type of program | The word 'sale' |
Merchant ID | Your ShareASale MerchantID |
The first two items are directly available on the thank you page trough the special curly bracket '{{}}' markup. The last two items is your MerchantID from ShareASale, and the word 'sale' to indicate that it's a sale being tracked.
3. Now we're ready to create the pixel. It's done by adding an html image element to your thank you page with the source attribute set to shareasale.com to track the event.
If your MerchantId were to be the number '12345' then you would add this piece of code right above the {% endblock %} on the thank you page:
<img src="https://shareasale.com/sale.cfm?amount={{order.total_price * 0.01}}&tracking={{order.id}}&transtype=sale&merchantID=12345" width="1" height="1">
4. That's it, we're done. Your thank_you.html should look similar to the one below.