Magento 2 Google Tag Manager
The Webkul Magento 2 Google Tag Manager extension publishes every important shopper action to window.dataLayer and lets you export a ready-to-import Google Tag Manager container. Install it once, add your GTM Container ID, and your storefront starts sending clean, structured e-commerce events that any tag — Google Analytics 4, Google Ads, Meta Pixel, or your own custom tags — can consume.
The extension is destination-agnostic by design. The storefront never hard-codes a vendor: it pushes neutral events like product_viewed, cart_item_added, and payment_completed. Vendor translation (GA4's view_item, Meta's AddToCart, and so on) happens inside Google Tag Manager — either in tags you build yourself, or in the container this extension can generate for you.
Two ways to work
You pick one path — you do not need both.
- Do-It-Yourself (DIY). Add your GTM Container ID, and the storefront pushes every event to the dataLayer. You build the tags inside Google Tag Manager. Leave the Destinations group untouched.
- Guided Setup. Fill in the Destinations group (GA4, Google Ads, Meta Pixel), then download a container the module pre-wires for you and import it into GTM. No manual tag setup needed.
What it tracks
Out of the box the extension can track 18 shopper actions across the whole funnel — browsing, product views, cart activity, checkout steps, purchases, and account events. Each one is an on/off toggle. See Shopper Actions to Track for the full list and Events & dataLayer for the payload schema.
Where to go next
| Area | What it helps you do | Guide |
|---|---|---|
| Requirements | Check your store meets the prerequisites. | Open requirements |
| Installation | Add the extension via Composer and enable it. | Open installation |
| Activate & connect | Enter your license and GTM Container ID and go live. | Open activation |
| Configuration | Choose which events to track and tune the data. | Open configuration |
| Destinations | Connect GA4, Google Ads, and Meta Pixel. | Open destinations |
| Server-side tagging | Route GA4 through your own sGTM server. | Open sGTM guide |
| Verify | Confirm events fire in GTM Preview / debug mode. | Verify events |
Quick start
- Read the Requirements.
- Complete the Installation.
- Activate & connect — enter your module license and GTM Container ID.
- Pick your Shopper Actions to Track.
- Choose a path: build tags in GTM yourself, or use Guided Setup and export a container.
- Verify events in GTM Preview mode.
- If something looks off, open Troubleshooting.
