Skip to main content
19 votes

Add Google Tag Manager to Magento 2?

If you want to add Google Tag Manager without creating a module, you can add the gtm code from your active theme. You can have two phtml templates to include the GTM snippet that needs to go to head ...
Saroj's user avatar
  • 477
8 votes

Add google tag manager code inside head and body

The basic GTM code can be added easily using the following three steps -: Step 1 gtm_head.phtml ---> YourTheme/Magento_Theme/templates/html/gtm_head.phtml add the following script: <!-- ...
Gagan Nayyar's user avatar
5 votes

Add Google Tag Manager to Magento 2?

It depends upon what all tracking codes you are trying to achieve with GTM, even if you make the above extension working for your Magento 2 store still you might not be able to get the data layer you ...
stevensagaar's user avatar
3 votes
Accepted

Google tag manager: Magento-2

Do you have Enterprise Version or Community/Open Source version of Magento? Tag Manager is available in Enterprise version of Magento only. Here is the URL for Open source version of Magento. http://...
Taran's user avatar
  • 566
3 votes
Accepted

How to install Google TAG Manager (GTM) to Magento 1.9.2 without extension?

Usually I would recommend an extension because it allows you to pass additional data to the tag manager like product id, cart contents and placed orders. But if you really just need it for this ...
Fabian Schmengler's user avatar
2 votes

Add Google Tag Manager to Magento 2?

There is also this module https://github.com/yireo/Yireo_GoogleTagManager2 that provides a data layer and it is free.
Claudiu Creanga's user avatar
2 votes

Add Google Tag Manager to Magento 2?

You can create a simple custom module with inside Vendor/Module/view/frontend/layout/default.xml .... <referenceContainer name="after.body.start"> <block class="Magento\Framework\View\...
LucScu's user avatar
  • 2,332
2 votes
Accepted

Google TAG MANAGER extension impossible located

As per the system.xml you can find it under: Stores > Configuration > Sales > Yireo GoogleTagManager If not please flush your webshop cache storage. php bin/magento c:f
Keyur Shah's user avatar
  • 18.1k
2 votes

Google tag manager: Magento-2

I have created a FREE module which provides the feature to add Google Tag Manager on Magento 2.x. Here's the link of the module: https://marketplace.magento.com/chapagain-googletagmanager2.html
Mukesh Chapagain's user avatar
2 votes
Accepted

How to retrieve the SKU of the first simple product for a configurable product

You should be able to use this: $_product->getTypeInstance()->getUsedProductCollection($_product)->getFirstItem()->getSku()
simonthesorcerer's user avatar
2 votes
Accepted

Google Analytics 4 not receiving purchase values from Magento 2

What you are describing is Google Tag Manager with a commerce datalayer implementation. This is only available in Magento enterprise (or Adobe Commerce whatever you call it). I suggest that you ...
anvanza's user avatar
  • 172
2 votes

Add Google Tag Manager to Magento 2?

Try out this module: https://www.weltpixel.com/google-analytics-enhanced-ecommerce-tag-manager-magento-2.html/ It is free and it has a lot of built in functioanlities. You just have to configure it ...
Koncz Szabolcs's user avatar
2 votes

How can I Add Google Tag Manager to Magento 2?

METHOD TO ADD GOOGLE TAG MANAGER TO MAGENTO 2 STORE In Magento 2, you can easily add the Google Tag Manager without any need for a third-party extension. To add Google Tag Manager to your Magento 2 ...
Monika MAC's user avatar
1 vote

How can I Add Google Tag Manager to Magento 2?

Open your Magento Admin Panel and move to Content > Design > Configuration > Edit the Store View > Other Settings> HTML Head. Paste the code you got from GTM for the tag here.
Gohil Rajesh's user avatar
  • 2,955
1 vote

Search through magento admin panel to see which script are loaded where

Simply you can use grep command for search in file through SSH grep -l -r "your string" foldername/ e.g grep -l -r "www.googletagmanager.com/" vendor/magento e.g grep -l -r "...
Gohil Rajesh's user avatar
  • 2,955
1 vote

How can I Add Google Tag Manager to Magento 2?

The best way is to use some ready-made Magento 2 GTM extension, because if you just add Google Tag Manager (GTM) code to the HTML head, how would you like to integrate Google Analytics (GA), Google E-...
lemk0's user avatar
  • 608
1 vote

How can I Add Google Tag Manager to Magento 2?

You can easily add Google Tag Manager in Magento 2 without third-party extensions. All you need is to add the GTM code to your active theme. The GTM code is divided into two parts: script and noscript....
Msquare's user avatar
  • 9,183
1 vote

Google Analytics not collecting ecommerce session data

Setting up google tag manager fixed this issue: https://docs.magento.com/m2/ee/user_guide/marketing/google-tag-manager.html As the docs explain you need to Configure Your Google Analytics Account to ...
Holly's user avatar
  • 4,873
1 vote
Accepted

Account type not visible in Google API> Google Analytics configuration page Magento 2

You have set up wrong for Google Tag Manager. These option used for google analytics like UA-1344454 You can easily add GTM without third-party extensions. All you need is to add the GTM code to ...
Vijay Khirade's user avatar
1 vote

Magento 2 How to exclude Head Miscellaneous Scripts section from deferred?

replace below code in Observer.php file <?php namespace Meetanshi\DeferJS\Model; use Meetanshi\DeferJS\Helper\Data; class Observer implements \Magento\Framework\Event\ObserverInterface { ...
Jigs Parmar's user avatar
  • 2,438
1 vote

Enhanced Ecommere GTM - GA in Magento 1.9.x

There are probably several Extensions out there, which provide this functionality. As you are probably a developer, you can also look up the documentation which values are needed on which page type, ...
Flyingmana's user avatar
  • 6,137
1 vote
Accepted

How resource intensive is it to get customer data?

I'd say you should test the loading time with and without your code. Probably it's not more than a couple milliseconds. The bigger disadvantage with your approach is that you cannot use a full page ...
Andreas von Studnitz's user avatar
1 vote
Accepted

Magento remarketing tag

As another solution based on the discussion in the comments you may be want to place something like this in your Minicart template (app/design/frontend/[theme]/[theme]/template/checkout/cart/minicart/...
Christoph Farnleitner's user avatar
1 vote

Add google tag manager code inside head and body

I would also note that Magento 2 Enterprise Edition has some built in support for GTM: http://docs.magento.com/m2/ee/user_guide/marketing/google-tag-manager.html This is also a relevant ...
thaddeusmt's user avatar
  • 1,395
1 vote
Accepted

After enabling Google Tag Manager, Paypal Express checkout breaks

After contacting Magento's Enterprise support, it was confirmed this is a bug between GTM and Paypal Express. I was able to fix this problem by creating an observer on setGoogleAnalyticsOnCheckout ...
Ryre's user avatar
  • 1,147

Only top scored, non community-wiki answers of a minimum length are eligible