Download the PHP package acid-unit/module-google-tag-manager without Composer
On this page you can find all versions of the php package acid-unit/module-google-tag-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download acid-unit/module-google-tag-manager
More information about acid-unit/module-google-tag-manager
Files in acid-unit/module-google-tag-manager
Package module-google-tag-manager
Short Description Comprehensive and flexible Magento Open Source and Adobe Commerce Google Tag Manager extension
License OSL-3.0
Informations about the package module-google-tag-manager
🧪 Google Tag Manager Extension for Magento
A powerful, flexible, and user-friendly GTM extension for Magento Open Source & Adobe Commerce.
🔹 Tracks eCommerce events like Add to Cart, Checkout, Purchases, Clicks, and more.
🔹 Customizable via admin settings (no coding needed).
🔹 Works out of the box with minimal setup.
Quick Installation
To install the module, run:
After installation, enable the module and update Magento:
General Info
Module configuration is done under the
Stores > Settings > Configuration > Acid Unit > Google Tag Manager
section. All settings are clearly labeled and designed for ease of use.
Modifying event structure or data layer output requires code-level changes. Admin settings allow you to enable/disable specific events, set custom event names, and define conditions for event triggers—without touching code.
If the event name is set, it will be pushed as event
property like on the screenshot below.
Debugging
When debugging is enabled, all objects pushed to the data layer are logged in the browser console.
Tracked Events
The module automatically tracks the following user interactions and pushes structured data to the Google Tag Manager data layer:
- Page Load
- PDP
- PLP
- SRP
- CMS Page
- Include or Exclude Pages
- Custom URLs
- Click
- Product
- Menu Item
- Swatch
- Checkout Flow
- Added to Cart
- Removed from Cart
- Cart Item Qty Changed
- Checkout Steps Reached
- Purchase Done
- Customer Session
- Logged In
- Failed
- Logged Out
- Registration
- Failed
- Logged In
- Exposure
- Products in List
- Top Menu Category
- Custom Blocks
- Wishlist
- Product Added
- Product Removed
GTM Events
Below, event data structure examples will be shown as they are pushed to the data layer.
Page Load
Page Load events can be triggered for any kind of page. Based on the page type, different set of data will be pushed to the data layer.
Event structure and data can be modified in js/model/page-load.js
file
PDP
PLP
Example of event data structure that is pushed when PLP is loaded:
SRP
Search Results Page has similar event data structure to PLP:
CMS Page
Event data structure example that is pushed to the data layer when CMS Page is loaded:
Include or Exclude Pages
You can exclude specific pages from triggering GTM events using Magento layout handles.
Add one of the page handles to the Page Layout Handles List
textarea,
and make sure List Behavior
is set to Exclude
:
In this case, home page and product category with id 12
won't trigger event on load.
Setting List Behavior
to Include
reverses the logic - only
the listed pages will trigger Page Load events.
Meaning, only home page and category with id 12
will trigger Page Load events.
More info regarding layout handles you can find on a corresponding Adobe Developer Portal Page
Custom URLs
Events can be pushed to the data layer for custom pages—those that do not fit
into predefined categories like PDP, PLP, or CMS pages. For example, the /contact
page:
Note: The page URL can be set as part of the URL; it is not mandatory to define the entire URL.
URL matching works on a substring basis.
This means that if you define a rule for /contact
,
it will also match URLs that contain /contact
within them, such as:
/contact
/contact-us
If you need to track these pages separately, consider change page URLs to avoid unintentional overlap.
Click
Event structure and data can be modified in js/model/page-click.js
file
Product
This event is triggered when the product is clicked on PLP, SRP or any other product list. Click event listeners are attached to the following selectors:
a.product-item-photo
a.product-item-link
Event data and structure:
Menu Item
Swatch
Checkout Flow
Event structure and data can be modified in js/model/checkout-flow.js
and js/model/page-load.js
files
Added to Cart
Removed from Cart
Cart Item Qty Changed
Event is triggered both when qty is changed in minicart and on cart page.
If multiple product quantities are updated at once (e.g. on cart page),
all affected products will be included in the products
array.
Checkout Steps Reached
When shipping step is loaded:
When the billing step is loaded, cart product info is not included in the event data:
Note: cart products info is not included in the event data for billing step.
Purchase Done
Customer Session
Customer session events send the event name, Customer ID, or error message to the data layer.
Event structure and data can be modified in js/handler/page-data.js
file
Logged In
Failed
Logged Out
Registration
Failed
Exposure
Exposure events are pushed to the data layer when the blocks get visible on the screen. When there are multiple blocks of the same type, they are pushed as elements of array.
When the block reveals on the screen, a timeout (default is 100ms) is triggered, which will clear if the same type of block gets visible. This allows to combine the same type of exposure blocks into a single event if the customer scrolls the page rapidly.
Event structure and data can be modified in js/handler/exposure.js
file
Products in List
Top Menu Category
Custom Blocks
Here you can set any block to trigger exposure event by using an HTML selector
Wishlist
Event structure and data can be modified in js/handler/page-data.js
file
Product Added
Event data and structure:
Product Removed
The event structure is identical to the "Product Added to Wishlist" event, but with a different event name:
Full Setup Reference
Complete setup process:
Requirements
✅ Compatible with: Magento Open Source & Adobe Commerce >=2.4.4
✅ Requires PHP 8.1+
🛠 Tested on Magento Open Source 2.4.7-p3
with PHP 8.3
All versions of module-google-tag-manager with dependencies
acid-unit/module-core Version ^0.3
magento/framework Version 103.0.*
magento/module-catalog Version 104.0.*
magento/module-checkout Version 100.4.*
magento/module-config Version 101.2.*
magento/module-configurable-product Version 100.4.*
magento/module-customer Version 103.0.*
magento/module-eav Version 102.1.*
magento/module-media-storage Version 100.4.*
magento/module-quote Version 101.2.*
magento/module-sales Version 103.0.*
magento/module-store Version 101.1.*
magento/module-theme Version 101.1.*
magento/module-wishlist Version 101.2.*
php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0