Adding External JS to the order Thankyou Page

We have a script that used to be added on the Thankyou page via Additional Script from Admin (order status in the Checkout tab ). The additional script filed will be removed as per new changes in Shopify.
Can you please let us know how we can add that script to the Thankyou page? I have checked the Checkout UI extension and I cannot find a way to add the external JS to the thank you page.

Is there any way we can do that? Or if there is any way for Shopify partners / Developers to have a way to do that. Our App added these scripts but now we are searching for a way to do that.

Hi Shaileshbizspic,

Which the new releases for checkout if would be possible to simply add externally hosted scripts - but it’s possible you might be able to use checkout UI extensions to achieve the same functionality, and contain the JS within your app, rather than host it externally. This general process is described in the add custom content to thank you and order status pages tutorial. Would this work for you?

1 Like

Hello @Liam
I have two questions
1: What will be the flow for the checkout UI extension .. how can I keep my script inside the app and call it from the checkout UI block, it would be a great help if you provide me with any example you have.
Can you please explain if how we can keep the script and call the app itself from any block from the checkout UI extension?
The app here you mean the external app that currently we are using or it is the checkout UI extension?
it would be a great help if you provided with any examples you have. and or you explain the flow
2: Will this Custom pixel be a sure-shot solution for the coming years? I ann see that we can use custom Pixel under the Customer Event in the Admin to add our script but I can see some message on it that Shopify is kind of not supporting it .. you guys are promoting the Web Pixel app. Please let me know if this can be a future proof or if it can also be removed.

1 Like

Hello @Liam
Any update on this.

Hello @Liam ,
Any update on this?

Hey Liam , can you explain how can we keep the JS within our app and access it from the Thank you page ?
Thanks in Advance :folded_hands:

@shaileshbizspic @abhi4924 @Liam

I know this thread has been dead a long time but anyone figure out the answer to this?

1 Like

hello have you found any solution? It will be great help for me.

Housing JS snippets in Web Pixels has been fully releases as of early this year I believe:
https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels

Hi did you get how to implement this ?

Hi, did you get how to implement it ?