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

Why is it recommended to add a custom pixel for Google Tag Manager instead of inserting the script?

Solved

Why is it recommended to add a custom pixel for Google Tag Manager instead of inserting the script?

JBshop1
Shopify Partner
14 0 4

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!

Accepted Solution (1)

J_mah
Shopify Partner
200 11 26

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

 

 

 

Your COFFEE TIP is here!
For Google Tag Manager GTM setup or Store design assistance DM me
sam.analyst4@gmail.com! orWhatsApp!
Solved? accept it as solution with like

View solution in original post

Reply 1 (1)

J_mah
Shopify Partner
200 11 26

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

 

 

 

Your COFFEE TIP is here!
For Google Tag Manager GTM setup or Store design assistance DM me
sam.analyst4@gmail.com! orWhatsApp!
Solved? accept it as solution with like