Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am building a Shopify app for installing google tag manager scripts. The scripts are generated on a few parameters in the back-end so users enters gtm-id / domain in the front-end and this generates a head code and a body code.
Now I want to insert this code in all pages of the customer shopify store.
I saw the script tags api but seems not recommend anymore. Next step I did was generate a extension and under blocks created my files. But these come with 2 problems
- How to place my dynamic script instead of a static script
- The user needs to enable it on a separate page ( the less clicks the better sow can I do this with the api)
Thanks in advance
There is a new solution for <head> section of Shopify pages – Head Page Notia app which is free to install and use.
In this app you can add script to all pages or special code for particular page. For example you can add Structure data JSON according Schema.org.
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