Help with ScriptTag or Asset?

New Member
1 0 0

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.

Shopify Staff
Shopify Staff
1043 141 183

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.