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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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.

Admin GTM Section

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.

Debugging GTM Events

Tracked Events

The module automatically tracks the following user interactions and pushes structured data to the Google Tag Manager data layer:

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:

Page Handles List Behavior

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:

Custom Pages Load

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:

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:

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

Exposure Custom Blocks

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

PHP Build Version
Package Version
Requires acid-unit/module-admin Version ^0.3
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package acid-unit/module-google-tag-manager contains the following files

Loading the files please wait ....