What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Adding External JS to the order Thankyou Page

Adding External JS to the order Thankyou Page

shaileshbizspic
Shopify Partner
6 0 1

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.

Replies 10 (10)

Liam
Community Manager
3108 344 895

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?

 

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

shaileshbizspic
Shopify Partner
6 0 1
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.
 
shaileshbizspic
Shopify Partner
6 0 1

Hello @Liam ,
Any update on this?

Jamflynt
Shopify Partner
40 0 22

@shaileshbizspic @abhi4924 @Liam 

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

rohit720
Shopify Partner
11 1 5

Hi did you get how to implement this ?

 

shaileshbizspic
Shopify Partner
6 0 1

Hello @Liam 
Any update on this. 

Anil_learner
Shopify Partner
6 0 2

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

Jamflynt
Shopify Partner
40 0 22

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

abhi4924
Shopify Partner
2 0 0

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 🙏

rohit720
Shopify Partner
11 1 5

Hi, did you get how to implement it ?