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.

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

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

Thank you for your interest in our products!