Magento 2 Google Tag ManagerMagento 2 Google Tag Manager
Live Demo
Buy Now
Support
Live Demo
Buy Now
Support
  • Getting Started

    • Introduction
    • Requirements
    • Installation
    • Activate & Connect
  • Configuration

    • Overview
    • General Settings
    • Shopper Actions to Track
    • Tracking Data Tuning
    • Consent & PII (GDPR / CCPA)
    • Developer
  • Destinations & Export

    • Overview (Guided Setup)
    • Google Analytics 4
    • Google Ads
    • Meta Pixel
    • Container Export
  • Events & dataLayer

    • Overview
    • Category & Search
    • Product
    • Cart & Checkout
  • Server-Side Tagging (sGTM)

    • Overview
  • How-To (find your IDs)

    • GTM Container ID
    • GTM Account ID
    • GA4 Measurement ID
    • Google Ads Conversion ID & Label
    • Meta Pixel ID
    • Validate the Installation
    • Verify Events (GTM Debug)
  • Help

    • Troubleshooting
    • FAQ

Requirements

Before installing the Magento 2 Google Tag Manager extension, make sure your environment meets the following requirements.

Platform

ComponentMinimumRecommended
Magento / Adobe Commerce2.4.x2.4.6+
PHP8.18.1 / 8.2
Composer2.xlatest 2.x
MariaDB / MySQL10.4 / 8.010.6 / 8.0
Search engineElasticsearch 7.x / OpenSearchOpenSearch 2.x

The extension is a standard magento2-module (composer package webkul/googletagmanager, current version 4.0.6) and works on Community Edition, Adobe Commerce, and Adobe Commerce Cloud.

Module dependencies

The extension declares a sequence on these core Magento modules — they ship with every Magento install, so there is nothing extra to enable:

Magento_Backend, Magento_Config, Magento_Store, Magento_Catalog, Magento_Customer, Magento_Sales, Magento_Checkout, Magento_Quote, Magento_Wishlist, Magento_CatalogSearch, Magento_Multishipping, Magento_Directory, and Magento_Csp.

Content Security Policy

The extension is CSP-aware (it sequences after Magento_Csp). On a store that enforces a strict CSP, allow the Google Tag Manager domains so the container can load. See Troubleshooting.

Accounts you will need

Depending on which path you choose, have these ready before you start:

  • Google Tag Manager account + container — required for both paths. You will need your GTM Container ID (GTM-XXXXXXX). See How to find your Container ID.
  • Google Analytics 4 (optional) — a Measurement ID (G-XXXXXXXXXX).
  • Google Ads (optional) — a Conversion ID and Conversion Label.
  • Meta Pixel (optional) — a Pixel ID.
  • Server-side GTM server (optional) — only if you plan to use server-side tagging.

Once your store meets these requirements, continue to Installation.

Prev
Introduction
Next
Installation