Welcome to the Google Tag Manager documentation.
Whether you are a new or an advanced user, you can find some useful information here.
Firstly, please, find our extension in My Downloadable Products section of our store. Learn how to install extension.
Copy the installation instructions from the page My Downloadable Products to the SSH console and press ENTER.
Enable the extension:
php -f bin/magento module:enable Mirasvit_Core Mirasvit_Tm Mirasvit_GoogleTagManager
Install the extension:
php -f bin/magento setup:upgrade
Clean the cache
php -f bin/magento cache:clean
rm -rf pub/static/*
rm -rf var/view_preprocessed/*
php -f bin/magento setup:static-content:deploy
Enable the extension:
php -f bin/magento module:enable Mirasvit_Core Mirasvit_Tm Mirasvit_GoogleTagManager
Install the extension:
php -f bin/magento setup:upgrade
Clean the cache
php -f bin/magento cache:clean
rm -rf pub/static/*
rm -rf var/view_preprocessed/*
php -f bin/magento setup:static-content:deploy
Run the command
composer require mirasvit/module-gtm-hyva:*
Enable installed Hyva modules:
bin/magento module:enable Hyva_MirasvitGoogleTagManager
Update Magento database schema and data with the command:
bin/magento setup:upgrade
Compile the code of the installed extension:
bin/magento setup:di:compile
bin/magento cache:flush
Our Google Tag Manager for Magento 2 is a simple, yet powerful extension that allows you to track the shopping behavior of your customers. Gathered data is supplied through the Google Tag Manager service (GTM) to any analytics suite to get hints on how to increase marketing ROI and boost sales.
Use this extension to track the shopping behavior of customers. Know when they add/remove/view cart, add to wishlist, begin checkout, make purchase, choose shipping and payment methods, and many other actions.
The module Google Tag Manager (GTM) for Magento 2 requires a prior configuration before it is fully ready to use.
In order to connect your Magento 2 store to the Google Tag Manager service using our extension, it is required that you create an account on the GTM service. A Google account is required to create a GTM account.
Login to your GTM account and navigate to Workspace section. Click your container ID (find a string GTM-XXXXXX) to open a window with <head>
and <body>
GTM code snippets.
Copy these GTM JavaScript code snippets.
In your Magento store navigate to Store > Settings > Configuration > Mirasvit Extensions > Google Tag Manager to open the module's settings.
Set Enable GTM to yes.
Paste GTM code snippets:
<head>
code snippet (formatted as <!--Google Tag Manager-->
) into the script field<body>
code snippet (formatted as <!--Google Tag Manager (nocstipt)-->
)Replace GTM-XXXX with the ID of your Google Tag Manager account.
Activate Enable GTM Logging for extension to write logs and store them in the file var/log/gtm_all.log.
To transfer data from GTM to analytics suite, you need to create GTM tags. You can do this manually in GTM service or use the Container Import section in your Magento store. This provides configuration for GA4, Google Universal Analytics, Google Ads Conversions
To configure a container provide data on:
GTM Tags require some time for activation. Typically it takes 48 hours before GTM tag will start sending data to your Google Analytics account.
Configure Google Ads by providing:
GA API Secret. Paste here your GA API Secret.
To add a GA API Secret:
This section allows to configure data in the tracking events.
Option | Description |
---|---|
Track Brand on the Category pages | Enable it to track the relevant brand attribute on category pages. |
Brand | Select the corresponding brand attribute or leave it empty to disable brand tracking. |
Track Variants | Set Yes to activate product variants tracking. |
Custom dimensions and metrics | Add these to collect and analyze the attributes from your store which are not tracked automatically by our extension. |
Activate Customer Mapping option to track Group ID in your store.
Google Tag Manager provides a debug panel on frontend to monitor the data collection. Activate by adding debug=gtm at the end of the page URL.
The debug panel allows you to see every tracked action made on the page and view which data was collected.
Some of the extension's settings are now available on the Tag Manager tab of its settings page.
Option | Description |
---|---|
Product identifier | Set the attribute that will be used for product tracking. Select from ID, or SKU. |
Identifier resolution | Select a parent or child product to track.. |
Track view catalog page event | Set Yes to track catalog pages. |
To upgrade the extension, follow these steps:
Update the extension with all dependencies:
composer require mirasvit/module-gtm:* --update-with-dependencies
<br><br>
Install the updates:
php -f bin/magento setup:upgrade
Clean the cache
php -f bin/magento cache:clean
rm -rf pub/static/*
rm -rf var/view_preprocessed/*
php -f bin/magento setup:static-content:deploy
To temporarily disable the extension please follow these steps:
php -f bin/magento module:disable Mirasvit_GoogleTagManager
To uninstall the extension, please follow these steps:
Disable the extension:
php -f bin/magento module:disable Mirasvit_GoogleTagManager
composer remove mirasvit/module-gtm
(2024-10-30)
(2024-07-12)
(2024-07-12)
(2024-07-10)
(2024-07-02)
(2024-07-02)
(2024-06-07)
(2024-06-05)
(2024-05-27)
(2024-05-17)
(2024-05-10)
(2024-04-26)
(2024-04-05)
(2024-04-01)
(2024-03-28)
(2024-03-19)
(2024-03-01)
(2023-12-27)
(2023-11-28)
(2023-11-22)
(2023-10-25)
(2023-10-17)
(2023-10-12)
(2023-08-24)
(2023-08-18)
(2023-07-13)
(2023-07-06)
(2023-06-21)
(2023-06-19)
(2023-06-07)
(2023-06-01)
(2023-05-23)
develop
(2023-04-20)
(2023-04-14)
(2023-03-23)
(2023-03-01)
(2023-02-13)
(2023-01-23)
(2022-12-26)
(2022-12-07)
(2022-12-05)
(2022-11-29)
(2022-11-17)
(2022-11-08)
(2022-11-01)
(2022-10-31)
(2022-10-04)
(2022-09-30)
(2022-09-20)
(2022-09-16)
(2022-09-15)
(2022-09-12)
(2022-09-06)
(2022-09-01)
(2022-09-01)
(2022-08-11)
(2022-08-04)
(2022-07-21)
(2022-07-21)
(2022-07-14)
(2022-07-05)
(2022-06-23)
(2022-06-20)
(2022-06-06)
(2022-05-26)
(2022-05-11)
(2022-05-09)
(2022-05-03)
(2022-04-29)
(2022-04-25)
(2022-04-21)
(2022-04-20)
(2022-04-20)
(2022-03-25)
(2022-03-15)
(2022-03-14)
(2022-01-19)
(2021-12-29)
(2021-12-06)
(2021-12-03)
(2021-11-30)
(2021-11-23)
(2021-11-19)
(2021-11-15)
(2021-11-09)
(2021-07-12)