Deprecation of Order status page additional scripts

Hi,

We are using the Shopify Storefront API on our website, and since the Checkout API is deprecated, we need to redirect customers to the Shopify checkout page to complete their purchase. After the checkout is completed, we need to redirect users back to our website.

Previously, I achieved this using the “Order status page additional scripts” feature. However, this option will no longer be available. I also tried using web pixels, but redirection is not allowed there.

Is there any other way to achieve this?

I found a workaround using web pixels in combination with liquid templates. The basics are described in this article https://www.howcommerce.com/shopify-js-liquid/. I used the web pixel checkout_completed event to store the orderId in cookies. Then I added a new javascript in the liquid templates that checks if the “orderId” cookie exists. If it exists, the user is automatically redirected back to our website and the cookie is deleted.

This way, when the user clicks on the “continue shopping” button or goes to any shopify page, the script is executed and the user is redirected back to our site.

Hi,
Great find Martin!
I will try to see how this works for our purposes!