Where is the right place to post script tag in an embedded app ?

Highlighted
Tourist
15 0 1

Hi,

I've been following this tutorial https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react

Can someone tells me where is the right place to post script tag in an embedded app ?

Is there any install callback ?

 

Thanks

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

Hey @boolangery ,

 

If you want to place a JavaScript script tag on a Shopify store's online storefront, you can utilize the Shopify Script Tag API: https://shopify.dev/docs/admin-api/rest/reference/online-store/scripttag

 

But for an embedded app you are writing, you have the freedom of adding a script tag anywhere in your front-end code. So for the tutorial you are following, you could place a script tag when you are building the user interface in Polaris (https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/build-your-user-interface-with...). However let me know if I am missing something and you are having issues with this. 

 

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes