How to add google tag manager inside head and body? #76
Replies: 1 comment
|
The Magefan Google Tag Manager for Magento doesn't promote inserting the GTM script into the Head and Body sections. Instead, we use tracking IDs. That's done for the user's convenience, so you don't have to think about adding the script correctly. So, just add the GTM and GA4 scripts to the extension settings, under Stores > Configuration > Magefan Extensions > Google Tag Manager > Web Container. The extension will add the script to your store automatically. Note: it's important for you to delete any scripts you have inside your theme (Content > Design > Configuration > HTML Head > Scripts and Style Sheets) once you start using the extension, so you don't have duplicate tags loading. However, if you use some custom GTM loaders and need to insert them into Head and Body, switch the Google Tag Manager Installation Method (Stores > Configuration > Magefan Extensions > Google Tag Manager > Web Container) to Head and Body Script and paste the scripts there. |
Uh oh!
There was an error while loading. Please reload this page.
I’m using magefan google tag manager extension, but i already got gtm script in my store, i want to know the correct way to put the gtm code inside the extension, like inside head or body, so nothing breaks and tags works fine. anyone done this before? what’s the safest way to implement without double tracking? i want to keep my existing tags and still use magefan extension.
All reactions