Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi
I'm trying to set up GTM (Google Tag Manager) on my store and just learned that it's recommended to add a custom pixel for GTM instead of inserting the script directly. Is there a risk inserting the code on the head and body tags as instructed in GTM page? (e.g., any issue of duplicate data?)
I aim to analyze granular customer behavior on Google Analytics, using GTM (e.g., page scroll %, button click, input field activation, etc.)
Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi jbshop1,
Thanks for your query,
For ecommerce tracking it is recommended to configure custom pixel and configure GTM script to get the events and event data.
There are no risk to implement GTM snippet on the theme file.
as you are looking for tracking custom events (scroll %,button click,link click ) you can place the GTM script on theme file and trigger the event.
Feel free to ask if you have any questions.
Thanks
This is an accepted solution.
Hi jbshop1,
Thanks for your query,
For ecommerce tracking it is recommended to configure custom pixel and configure GTM script to get the events and event data.
There are no risk to implement GTM snippet on the theme file.
as you are looking for tracking custom events (scroll %,button click,link click ) you can place the GTM script on theme file and trigger the event.
Feel free to ask if you have any questions.
Thanks