Dear Support Forum,
We have implemented Google Tag Manger using this excellent guide and it works very well:
https://docs.generatepress.com/article/implement-google-tag-manager/
We would now like to add ‘Data Layers’ in Google Tag Manager and we are following this guide:
https://juliencoquet.com/en/2014/01/22/data-layer-google-tag-manager-for-wordpress/
Our question is: How do we implement it in GeneratePress?
We presume by creating a new Hook Element with the following settings:
– Content > this is where we paste the code from the guide
– Settings > Hook > ??? -> which hook is best ? According to the link, it should go should go in the WordPress header of the child theme but before Google Tag Manager container snippet
– Settings > Priority > ??? -> should the priority be zero?
– Display Rule > Location > Entire Site
– any other settings, e.g. ‘execute php’ ?
Many thanks for your help on this.
Kind regards,
Pairfum London
https://www.pairfum.com