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

Gtm 1

After enable specific options, the module adds scripts to pages:

Gtm 2

Demo

Installation

Composer

  1. Add repo to composer.json:
"repositories": [
    ...
    {
        "type": "vcs",
        "url": "git@git.auroracreation.com:aurora-modules/gooogle-tag-manager.git"
    }
    ...
],
  1. Add package to composer.json:
"require": {
    ...
    "aurora/google-tag-manager": "*"
    ...
},
  1. 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

  1. Unzip archive.
  2. Upload extension files on your server to:
{Magento root}
└── app/
    └── code
  1. 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.

Thank you for your interest in our products!