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

Highlighted
New Member
3 0 1

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  "{{ transaction.id }}", but that's not working.
How can i solve my problem?
Thanks

0 Likes
Shopify Partner
236 59 70

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: http://bit.ly/2Gr2aVF

 

Try this code:

 

<script>
  Shopify.Checkout.OrderStatus.addContentBox(
    '<img src="http://foo-pixel/tid={{ checkout.order_id }}" width="1" height="1" border="0" />'
  );
</script>

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 www.BrianAtWork.com

0 Likes