Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey guys,
I'm looking to improve my site speed, we've just moved to an OS2.0 theme so now can add custom liquid to product pages with sections intheme customiser.
For most app scripts you're told to add code the scripts to theme.liquid but if its something for the product page, does adding it in custom sections almost add a conditional load meaning other pages don't have to load the files like it would if you added it to theme.liquid which should then improve load on other pages?
For example, the Klaviyo back in stock code attached below - is this able to be transferred just on the product page instead of being in theme.liquid for speed improvements as shown below? Or will it not make any difference to speed?
Hey @Ecom_Swift
Thanks for getting back to me but I was looking to find out if scripts added on product page custom liquid blocks will help with speed or if its better to add scripts directly to theme.liquid.
Thanks,
George
Hello @George_Greenhil,
I'm Gina - Product Manager at flareAI. flareAI has helped Shopify stores generate $5+ million in sales from Google Search, on autopilot.
If it's helpful to you, please let me know by giving it a like or marking it as a solution.
It really depends upon the Shopify app. Some apps will check the app snippet in theme.liquid and some apps in other related snippets like the product. It's better to include the app snippet in whatever file the app is advising to include, to avoid any glitches.
I hope that this helps
Gina
flareAI
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025