Personalized checkout and custom promotions with Shopify Scripts
Received an email from shopify, saying Action required Use “checkout.order_id” on the Thank You page
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 the line:
if ({{ order.order_number }}) { var google_conversion_order_id = "{{ order.order_number }}"; }
Am I supposed to only change order.order_number to checkout.order_id?
Many Thanks.
Solved! Go to the solution
This is an accepted solution.
Hi @ladavies!
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:
* From your Shopify admin dashboard, go to Settings > Checkout.
* Scroll down to the Order status page section
* Locate the Additional scripts input box.
* 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:
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
Following ... I have the same email
This is an accepted solution.
Hi @ladavies!
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:
* From your Shopify admin dashboard, go to Settings > Checkout.
* Scroll down to the Order status page section
* Locate the Additional scripts input box.
* 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:
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
Ok, I get it, but what if we use order.id as an identifier since today, then suddenly we'll start using checkout.order_id. There are two different values. At least in our case, we tested it. It's not good when you have a few years of analytic data behind you and now your orders id's are different. Please correct me if I'm wrong. It looks like checkout.order_id == checkout.id
EDIT: Ok, I was wrong. checkout.order_id == order.id
did you ever get any answer from anyone? has your meta ads account gone down the drain?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024