Add Google Tag Manager to Magento
Also see: https://www.yireo.com/software/magento-extensions/googletagmanager2
Yireo_GoogleTagManager2 module has been refactored heavily: The architecture is redesigned, GA4
support is being added, GA3 support (aka UA/EE) is being removed, click-events are added and overall there is a huge
extensibility being added. The refactoring has come available under a new major version 3. If you were not using this
extension yet, you can just proceed with the composer installation which will pick this new version. If you were
using major version 2 in the past, edit your
composer.json file manually to use the new version
^3.0. Alternatively, update your
composer.json by using the command
composer require yireo/magento2-googletagmanager2:^3.0 --no-update. Next, upgrade with
Supported versions: Magento 2.3.7 or higher and 2.4.1 or higher (partially because of the requirement for PHP 7.4 or PHP 8.1).
composer.json for other requirements.