Adding tracking pixel in thank you page, I need help to get the transaction ID.

12 0 2

Hi there, I've added a custom pixel in my thank you page and  I need to use the transaction ID in the url of the pixel, something like:

    <img src="http://foo-pixel/tid=TRANSACTIONID"
    width="1" height="1" border="0" />

I've used, instead of "TRANSACTIONID" the tag  "{{ }}", but that's not working.
How can i solve my problem?

Shopify Partner
242 58 150

Hey @francesco4,


I understand that you're having trouble using the transaction ID in the url of your pixel.


Make sure you follow these instructions to get the code properly added to your thank you page:


Try this code:


    '<img src="http://foo-pixel/tid={{ checkout.order_id }}" width="1" height="1" border="0" />'

Let me know if this answers your question or if you need further help!

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit

New Member
1 0 0

Hi Brian,

do you know if this will add the code for all orders (successful and declined) or only successful ones?

Do you know if we need to add a check for transaction.status == "success" or something along the lines if we only want the pixel inserted for successful orders?

Much appreciated.