Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Got email from Shopify - "order.{anything}" replace with "checkout.order_id" in additional scripts

Solved

Got email from Shopify - "order.{anything}" replace with "checkout.order_id" in additional scripts

Little_Runt_Man
Visitor
2 1 2

An email from Shopify told me I had to do this.  I don't know how.

 

Screenshot 2024-06-12 221247.png

 

On the Checkout page I see a blue information box saying:

 

"Your Thank you and Order status pages must be replaced

 

 

Your Thank you and Order status pages are using incompatible apps and additional scripts, which is deprecated. Replace these with pixels in customer events and with app blocks in the editor, then publish your changes."

 

When I look at the Order status page additional scrips section under checkout, I see that I have a global site tag for my google adwords account.

 

Down near the bottom of the script is a line --> 'transaction_id': '{{ order.order_number }}'

 

Am I supposed to only change order.order_number to checkout.order_id?

Accepted Solutions (2)

Little_Runt_Man
Visitor
2 1 2

This is an accepted solution.

Looks like the Shopify advisor was able to fix it while typed the message above.

 

Disregard request.

View solution in original post

Mac
Shopify Staff
1702 178 289

This is an accepted solution.

Hi @Little_Runt_Man!

I’m happy to hear you have resolved your issue. I wanted to add some clarifying information for others who may have received the same issue:

 

You have received this email because your additional scripts on the Thank you page reference the Liquid order object. You can verify these references by following these steps:

  1. Navigating to Additional Scripts:

    * From your Shopify admin dashboard, go to Settings > Checkout.

    * Scroll down to the Order status page section
    * Locate the Additional scripts input box.

 

Mac_0-1718653916521.png

Locating and Reviewing the Code:

     * The input box displays only the first 5 lines of code.

     * To view the entire code block, highlight all the content within the input box, making sure to scroll down all the way.

     * Copy the highlighted content and paste it into a text editor of your choice.

     * This will allow you to easily review and identify all instances of the order object within the code.

Why?

Order creation on Shopify is asynchronous, meaning the Thank you page is likely to load before an order is created. When this happens the Liquid order object isn't always populated. This means Critical 3rd party systems like Google ads and analytics should not rely on the order object on the Thank you page. By contrast, the Order status page only renders when an order has been created, so it is safe to reference the order object on that page.

Solution

If you have tracking scripts for when an order completes, there are a couple of options available to you to resolve this:

  1. Move your analytics to app pixels: App pixels are great because they do not require coding. Shopify has a dedicated team to ensure your analytics flow smoothly. Additionally, some apps come with Server Pixels, which ​​deliver higher quality data to partners, helping to reduce the cost of acquiring new customers such as the Google & Youtube channel and Facebook & Instagram.
  2. Move to custom pixels: If there isn’t yet an app pixel that fulfills your requirements, you could consider a custom pixel.  For example, a common use case for custom pixels is Google Tag Manager which you can learn to set up through this guide. Setting up a custom pixel requires some technical knowledge and you might want to consider hiring a Shopify Expert.
  3. Update your existing Additional Scripts: This approach requires some coding. A Shopify Expert can assist you with this. However, be aware that this is not a long-term solution, as the Order Status Page additional scripts are deprecated and will eventually be discontinued. If you have a custom script that cannot be migrated to Pixels, you'll need to:
    1. Modify it to eliminate dependencies on the Liquid order object (e.g., order.email or order.line_items) with available references from the Liquid checkout object. This is identified in the email as order.{anything} or checkout.order.{anything}.
    2. Replace references used to identify the order such as order.name, order.number, checkout.order_number, and checkout.order_name with checkout.order_id. This is a different number that is consistent across checkout and the order. Please note, downstream systems that use this to reference the order will also need to be updated to match.

Mac | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 8 (8)

Little_Runt_Man
Visitor
2 1 2

This is an accepted solution.

Looks like the Shopify advisor was able to fix it while typed the message above.

 

Disregard request.

jorgeplantz
Visitor
2 0 1

Sorry. I am facing the same situation - how did you solve this?

BovineAl
Tourist
9 0 3

Hi Jorge,

I just accessed Shopify Help centre chat (from my shopify admin(top right menu or https://help.shopify.com/en).

Your code is found in Preferences>Checkout>Order status page additional scripts.
In the chat, I typed in the code with order. and the bot gave me the replacement code then got an advisor to check it.

 

The email isn't accurate as you actually need to change most lines with order.{anything} to checkout.{anything}.

But do not change order.name as the order object should still be used for the order's name or number. checkout.name isn't a valid attribute in Shopify's Liquid objects so should not be used. I don't know if there are other exceptions so best to check with the advisor in chat.

 

eg                    {% for line_item in order.line_items %}

replace with: {% for line_item in checkout.line_items %}

 

eg                    orderValue: '{{ order.total_price | money_without_currency | replace: ',', '.' }}',

replace with: orderValue: '{{ checkout.total_price | money_without_currency | replace: ',', '.' }}',

 

eg                      [ADT.Tag.c](http://ADT.Tag.c) = "{{ order.currency }}";
Replace with: [ADT.Tag.c](http://ADT.Tag.c) = "{{ checkout.currency }}";

 

 

codewarrior-uc
Visitor
2 0 0

In my case Additional Script is depricated!
what should i do!

 

additional script.JPG

BovineAl
Tourist
9 0 3

Hi Codewarrior,

Mine also has the exact same message saying it is deprecated - but don't worry, actually Order Status page is being deprecated August 2025. The Shopify staff member Mac's answer below also shows his as 'Deprecated'.

See https://help.shopify.com/en/manual/checkout-settings/customize-checkout-configurations/checkout-exte...

 

The additional scripts code for google tag manager you have is probably no longer needed now anyway- if you have the 'Google and YouTube' App installed and linked to Google Analytics GA4 and Merchant Centre (and your Google ads uses your Google Analytics GA4 as it's source of conversions) then Google should be getting it's tracking data that way. 

See https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/tracking-adwords-conversion...

 

 

 

Mac
Shopify Staff
1702 178 289

This is an accepted solution.

Hi @Little_Runt_Man!

I’m happy to hear you have resolved your issue. I wanted to add some clarifying information for others who may have received the same issue:

 

You have received this email because your additional scripts on the Thank you page reference the Liquid order object. You can verify these references by following these steps:

  1. Navigating to Additional Scripts:

    * From your Shopify admin dashboard, go to Settings > Checkout.

    * Scroll down to the Order status page section
    * Locate the Additional scripts input box.

 

Mac_0-1718653916521.png

Locating and Reviewing the Code:

     * The input box displays only the first 5 lines of code.

     * To view the entire code block, highlight all the content within the input box, making sure to scroll down all the way.

     * Copy the highlighted content and paste it into a text editor of your choice.

     * This will allow you to easily review and identify all instances of the order object within the code.

Why?

Order creation on Shopify is asynchronous, meaning the Thank you page is likely to load before an order is created. When this happens the Liquid order object isn't always populated. This means Critical 3rd party systems like Google ads and analytics should not rely on the order object on the Thank you page. By contrast, the Order status page only renders when an order has been created, so it is safe to reference the order object on that page.

Solution

If you have tracking scripts for when an order completes, there are a couple of options available to you to resolve this:

  1. Move your analytics to app pixels: App pixels are great because they do not require coding. Shopify has a dedicated team to ensure your analytics flow smoothly. Additionally, some apps come with Server Pixels, which ​​deliver higher quality data to partners, helping to reduce the cost of acquiring new customers such as the Google & Youtube channel and Facebook & Instagram.
  2. Move to custom pixels: If there isn’t yet an app pixel that fulfills your requirements, you could consider a custom pixel.  For example, a common use case for custom pixels is Google Tag Manager which you can learn to set up through this guide. Setting up a custom pixel requires some technical knowledge and you might want to consider hiring a Shopify Expert.
  3. Update your existing Additional Scripts: This approach requires some coding. A Shopify Expert can assist you with this. However, be aware that this is not a long-term solution, as the Order Status Page additional scripts are deprecated and will eventually be discontinued. If you have a custom script that cannot be migrated to Pixels, you'll need to:
    1. Modify it to eliminate dependencies on the Liquid order object (e.g., order.email or order.line_items) with available references from the Liquid checkout object. This is identified in the email as order.{anything} or checkout.order.{anything}.
    2. Replace references used to identify the order such as order.name, order.number, checkout.order_number, and checkout.order_name with checkout.order_id. This is a different number that is consistent across checkout and the order. Please note, downstream systems that use this to reference the order will also need to be updated to match.

Mac | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

m90studio
Tourist
4 0 0

Hi Shopify - 

 

How come this message/email was not sent out to all merchants?! How come this new update promised to keep Additional Scripts intact until Aug 2025 but as soon as we switched only the first checkout page (information,payment,shipping) all of a sudden our order object behaved completely differently in Thank You page/Additional scripts EVEN THOUGH we are not upgraded on our Thank You and Status Page?!

 

This was severely false advertising, where we were under the impression we would get more time to refactor everything we had on Additional Scripts to move into Customer Events. The whole roll out of Checkout Extensibility has been a hot mess to say the least.

 

I'm extremely disappointed in the severe lack of communication from Shopify, which resulted in our team not being able to take necessary action to maintain all of our pixel structure and in turn affecting our reporting downstream. Luckily I was able to correct this by sheer grit and determination.

 

Shopify should absolutely not be stating that 'Additional Scripts' will function as intended without putting a MASSIVE banner on top of 'Additional Scripts' to let everyone know that 'order' does not work anymore if you make the switch. 

 

This has caused a massive headache for our team and I'm sure many other merchants. I still can't believe how Plus merchants are treated sometimes, seemingly zero technical support for when it actually matters and instead forcing high-paying contracts to dig for answers in forums. 

 

Signed,

A very frustrated Shopify dev

 

 

jonfidelity
Visitor
2 0 0

"Luckily I was able to correct this by sheer grit and determination."

 

How did you fix. this has affected the data being passed back to meta and our whole ad account has gone to sh*t. 

ty in advance!