Google Tag Manager - Magento 2 module documentation
Author: Jakub Szczubełek
Google Tag Manager Module
Module overview
Google Tag Manager module enables you to add google tags.
Module compatibility
This module is compatibile with Magento Community versions: 2.3 and 2.4.
How it works
After installing the module, head to the Admin Panel. There, go to Stores > Configuration > Aurora > Google Tag Manager > General Settings.
Under the given path, you will see configurations for the module:
Enabled – enable/disable module
Enable Data Layer – enable/disable data layer scripts
Container ID – ID of google container
After enable specific options, the module adds scripts to pages:
Demo
Installation
Composer
- Add repo to composer.json:
"repositories": [
...
{
"type": "vcs",
"url": "git@git.auroracreation.com:aurora-modules/gooogle-tag-manager.git"
}
...
],
- Add package to composer.json:
"require": {
...
"aurora/google-tag-manager": "*"
...
},
- In Magento root folder run commands:
composer update aurora/google-tag-manager
php bin/magento module:enable Aurora_GoogleTagManager
php bin/magento setup:upgrade
Manual
- Unzip archive.
- Upload extension files on your server to:
{Magento root}
└── app/
└── code
- In Magento root folder run commands:
php bin/magento module:enable Aurora_GoogleTagManager
php bin/magento setup:upgrade
Dziennik zmian
v1.0.4
- Update GitLab CI/CD.
- Code refactoring - coding standards, type hints.
v1.0.3
- Corrections regarding data added to the data layer.
v1.0.2
- Update README.
v1.0.1
- Fix module name.
v1.0.0
- Module init.