Regard replacement of strip tag in checkout page using theme extension

Topic summary

A Shopify app developer needs to migrate from deprecated ScriptTags to modern alternatives for including custom JavaScript on checkout pages. Current situation: The app uses two custom JS files previously loaded via ScriptTags, which Shopify now discourages.

Migration challenges identified:

  • App Embed Blocks (the recommended replacement) don’t function on checkout pages
  • Post Purchase Checkout Extensions only support DOM elements from Shopify’s UI library, not custom scripts
  • This creates a technical gap for apps requiring custom JavaScript at checkout

Suggested approach: One respondent indicates ScriptTags may still be the only viable option for checkout page customization, recommending best practices like asynchronous loading and code minification if continuing this method.

Related question: A third participant asks about including third-party scripts in post-purchase extensions to display recommended products, seeking alternative implementation methods.

Status: The discussion remains open with no definitive modern solution identified for custom checkout JavaScript.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Our Shopify app includes two custom JavaScript codes. We included js file in checkout page this by ScripTags, but recently we were notified that ScripTags are old and should be replaced with App Embeded Blocks (https://shopify.dev/apps/online-store/theme-app-extensions/extensions-framework#app-embed-blocks). We can use App Embeded block js inclusion but those blocks do not work in checkout pages. We were trying to use Post Purchase Checkout Extensions (https://shopify.dev/apps/checkout/post-purchase), but it looks like this options does not allow us to include custom script, only DOM elements, available from "

@Shopify/post-purchase-ui-extensions-react".

Is there any solution to achieve by theme extension or we can keep inclusion of js with script tag.

Please share your response.

Thanks

Not 100% sure on this but, if you need to include custom JavaScript on the checkout page, you may still use the script tag method as it is supported on the checkout page. However, if you want to use the latest recommended approach, you can create a Shopify app with an embedded block that can be added to the theme code.

The embedded block can be used to include your custom JavaScript on the storefront pages, except the checkout page. For the checkout page, you can use the Post Purchase Checkout Extensions, which allows you to modify the post-purchase page, but not the checkout page. As you mentioned, this option does not allow you to include custom script, only DOM elements.

Therefore, it seems that the script tag method is the only viable option for including custom JavaScript on the checkout page. However, make sure to follow best practices, such as using asynchronous loading, minifying the code, and avoiding any third-party scripts that might slow down the page loading.

Have a created post purchase extension , and trying to inlcude third party script , but cant include it , ?
what is the best way we can inlcude the script , need to show Recommended products using the included script ?

is it possible ? what are the ways we can do .

what is the best way

Thank you