FROM CACHE - en_header

Help with ScriptTag or Asset?

5 0 1

Hi devs,


I’m new to Shopify App developing, so bear with my questions:


I’m developing an app for the merchant to create a visual feature segment for the product pages. Backend and merchant site of the app is pretty much done, but I’m having a hard time finding the best way to implement on the store front.


I know this can work with a ScriptTag, but since I’m not really adding functionality, just HTML and CSS it might be overkill?

-> This lead me to questioning if I actually need the ScriptTag because I need some logic to handle what design to show on the different product pages…


Or can this be done with theme ‘Asset’ from the API, if yes how (or any reference that can lead me to how)?


I wasn’t able to find a lot of information about implementing via the ScriptTag or Asset API. (I have been reading the docs, but as a new developer this is no enough for me to continue)


I’m developing in Rails.


Thanks in advance for you help.

Reply 1 (1)
Shopify Staff
Shopify Staff
1098 146 220

Hey @Yougurt 


I'd probably lean toward ScriptTags, since they're easy to add and automatically removed if the merchant uninstalls your apps.


Keep in mind every product page is different, so this will add some complexity if you're trying to target specific elements.


Let me know if you have any questions.

Scott | Developer Support @ 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 or the Shopify Web Design and Development Blog