Order_number variable is not rendering on first arrival of order confirmation page, only after coming back to the page

I am working on a Shopify Plus store and need the order_number variable for a pixel snippet. We currently have these in the additional scripts section and not sure if I can convince them to use the custom pixels yet. This number is not rendering after checkout unless I refresh, or leave and comeback to my order confirmation page.

I’ve tried {{ order_number }} and {{ checkout.order_number }}

You’ll have issues with any of the following fields:

  • checkout.order.*
  • checkout.order_name
  • checkout.order_number
  • order.*

It is recommended to use checkout.order_id
This field will be available as soon as the thank-you page loads and it is available when you upgrade to web pixels.

1 Like

Hey thanks @Dave_Strang! We ended up going with this and it will work.