Magento 2 Google Tag Manager User Guide
Paid media and GA4 reporting collapse when Magento ecommerce events are missing or duplicated. This guide shows how Towering Media Google Tag Manager ($229) ships a structured GA4-ready dataLayer—install overview, container setup, key events, troubleshooting, and FAQ. Deep wiki docs remain the product User Guide.
For screenshot-heavy / deep technical steps, see the detailed wiki documentation. Product details and add-to-cart live on the Google Tag Manager page. Browse more modules in Magento 2 Extensions.
Table of Contents
Why Magento Tracking Goes Wrong
Hard-coded tags and incomplete dataLayers create reporting debt:
- Missing purchase events — Ads and GA4 under-report revenue
- Duplicate conversions — remarketing and purchase fire twice
- Wrong money fields — tax, shipping, and coupons omitted
- Theme breakage — Luma snippets fail on Hyvä / CSP storefronts
What This Extension Solves
Google Tag Manager by Towering Media provides a Magento-native GTM integration with structured GA4 ecommerce dataLayer events—without modifying Magento core.
- Full GTM container integration for Magento 2
- Structured GA4 events (view_item, add_to_cart, purchase, and more)
- Accurate revenue, tax, shipping & coupon tracking
- Google Ads conversion / remarketing friendly payloads
- Clean Magento-native implementation (no core overrides)
- Hyvä & Luma compatible (CSP-conscious patterns where supported)
Key Features
- Admin fields for GTM container ID(s)
- Ecommerce dataLayer event coverage for key funnel steps
- Optional deferred loading patterns for performance
- Works alongside consent tooling when configured carefully
- Open Source & Adobe Commerce Magento 2.4.x
System Requirements
- Magento: 2.4.4 – 2.4.7+ (Open Source & Adobe Commerce)
- PHP: 8.1, 8.2, or 8.3
- Towering Media Composer repository credentials
- A Google Tag Manager container (and GA4 / Google Ads tags as needed)
General Composer install steps: Installation guide.
Installation Overview
Step 1: Authenticate Composer
Add your Towering Media credentials to auth.json in the Magento root (same pattern as other Towering Media extensions).
Step 2: Require the package
composer require toweringmedia/module-gtm
Step 3: Enable and upgrade
php bin/magento module:enable Toweringmedia_Gtm
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
Exact module enable name may match your package’s registration.php/module.xml—confirm in the package after install. Production stores should follow your normal deploy process.
Add Your GTM Container
Enable the module and paste your GTM container ID:
- Log in to Magento Admin.
- Open Stores → Configuration → Toweringmedia → Google Tag Manager.
- Enable the extension and enter your GTM Container ID (e.g. GTM-XXXX).
- Configure any store-view specific containers if you run multi-store.
- Save Config and flush cache.
- Use GTM Preview / Tag Assistant on product, cart, and success pages.
Validate GA4 Ecommerce Events
In GTM Preview, confirm view_item, add_to_cart, begin_checkout, and purchase fire once with correct items, value, tax, and shipping. Publish GA4 / Ads tags only after the dataLayer looks clean.
- Test guest and logged-in checkouts
- Verify coupon codes appear when used
- Pair with Google Shopping Feed so product ads and onsite tracking share clean IDs
Troubleshooting
Container never loads
- Confirm Container ID and Enable = Yes
- Check CSP / ad blockers in the test browser
- Flush Magento and Full Page Cache
Purchase missing or duplicated
- Inspect success-page dataLayer in GTM Preview
- Ensure only one purchase tag fires in the container
- Confirm order success page is reached after payment
Still stuck? Contact support with the exact admin error text or log snippet (never paste API secrets or private keys in plain email).
Frequently Asked Questions
Where is the primary User Guide?
On the product page, User Guide / docs CTAs stay on the wiki. This CMS page is the shopper-friendly overview.
Is it Hyvä compatible?
Yes—built with Hyvä & Luma compatibility in mind.
How much does it cost?
$229 — see the product page for current pricing.
Does it replace GA4 configuration inside GTM?
No. It provides Magento dataLayer events; you still configure GA4/Ads tags in GTM.
Related Extensions & Resources
Want our Magento team to handle it?
Towering Media installs, configures, and customizes Google Tag Manager for Magento 2 stores — along with product feeds, conversion tracking, and paid and organic campaign setup.
Get the Extension
Fix Magento ecommerce tracking at the dataLayer. Deploy a clean GTM integration with GA4-ready events—so Ads, Analytics, and remarketing finally agree with Magento revenue.
Prefer the wiki? Open the full documentation.