Google Tag Manager

GA4-ready GTM for Magento 2

  • GA4 Events Structured ecommerce dataLayer
  • CSP Safe Hyvä-friendly container load
  • Consent Ready OneTrust, Cookiebot, CookieYes
  • Server Side Optional Measurement Protocol

Accurate GA4 ecommerce tracking

Manual tag setup is error-prone and missing ecommerce events hurt marketing decisions. This extension injects Google Tag Manager and pushes structured GA4 dataLayer events for views, cart, checkout, and purchase.

  • Loads your GTM container with optional deferred loading
  • GA4 events including view_item, add_to_cart, purchase
  • Track by SKU or ID with optional brand and variant
  • Tax, shipping, coupon, currency, and order ID controls
  • Consent hooks for OneTrust, Cookiebot, and CookieYes

Built for your store

Hyvä-oriented Magento 2.4.x GTM setup with CSP-conscious loading and optional React Checkout Pro purchase plugins.

  • Works with Magento 2.4.x Open Source & Adobe Commerce
  • PHP 8.1, 8.2, and 8.3 compatible
  • Configure under Toweringmedia Google Tag Manager (Hyvä)
  • Ads-ready dataLayer for conversion and remarketing
  • Core tracking works without React Checkout Pro

How It works

1
Configure
Add your Google Tag Manager container ID in Magento admin and enable the extension with preferred tracking settings.
2
Track Events
Automatically send ecommerce data such as product views, add to cart, checkout steps, and purchases to GTM.
3
Optimize Growth
Use accurate data in Google Analytics and ad platforms to improve campaigns, conversions, and store performance.

Magento 2 Google Tag Manager Extension for Better Ecommerce Measurement

See which products shoppers explore, where they leave checkout, and which purchases appear in your campaign reports. Towering Media's Magento 2 Google Tag Manager extension connects your store's ecommerce activity to Google Tag Manager, giving GA4 and your configured advertising tags the product and order data they need.

A GTM snippet loads your container. This extension goes further by supplying a structured ecommerce dataLayer for product interactions, cart activity, checkout steps, and purchases. Your team gets a Magento-specific tracking foundation instead of building each connection from scratch.

Built for merchants and agencies using Hyvä or Luma, it combines configurable purchase values, product identifiers, consent controls, and container export tools. Manage tracking preferences in Magento Admin and marketing tags in GTM, without modifying Magento core files.

Understand Product Interest and Checkout Drop-Off in GA4

Follow the journey from product discovery to purchase with GA4 ecommerce events. Compare product views with cart additions, examine checkout progression, and identify items that attract interest without converting.

  • Product discovery: Product list views, product selections, and individual product views.
  • Cart activity: Add to cart, remove from cart, and view cart.
  • Checkout: Begin checkout, shipping information, payment information, and purchase events.

These events provide the inputs for your GA4 reports. Validate the event sequence on your store, particularly when using a customized checkout.

Connect Product Data to Google Ads and Remarketing

Give Google Ads conversion and remarketing tags access to product identifiers and purchase details. Choose SKU or product ID to align item identifiers with your product feed, and include optional brand and variant information for more useful product reporting.

For example, an agency can use the same product identifiers across its shopping feed and tracking setup. Google Ads conversion actions, tags, and audience settings still need to be configured and tested.

Choose the Purchase Values Your Reports Use

Purchase data includes transaction ID, currency, ordered items, coupons, tax, and shipping. Settings let you exclude tax or shipping from transaction revenue, helping your team compare results using the same revenue definition.

This is useful when your marketing team measures merchandise revenue separately from delivery charges. Consent choices, attribution settings, and other tracking scripts can still cause differences between Magento and analytics reports.

Support Hyvä Performance Without Overlooking Campaign Visits

The extension uses Hyvä-aware, CSP-conscious loading and supports Luma storefronts. Optional deferred loading can wait for shopper interaction on ordinary visits, while recognized campaign visits load GTM without that interaction delay, subject to the configured consent checks.

This helps balance initial page workload with campaign measurement. Your container's tags still affect performance; deferred loading is a configuration choice, not a guaranteed speed score.

Coordinate GTM Loading With Cookie Consent

Connect tracking to supported consent managers, including OneTrust, Cookiebot, CookieYes, and custom integrations. Configure required consent categories and optional Google Consent Mode V2 settings in Magento Admin.

The extension supplies consent controls for your tracking setup. Your cookie banner and GTM tags must also be configured correctly; the module does not replace a consent platform.

Reduce Manual Tag Setup With GTM Container Export

Generate an importable GTM container JSON file with preconfigured tags, triggers, and variables based on your saved settings. A separate CSV export documents tracked events and parameters, making handover between developers and marketing teams easier.

Review the export against your existing workspace before merging it. Replacing overlapping tags is an important part of avoiding duplicate events.

Add Optional Server-Side GA4 Purchase Tracking

GA4 Measurement Protocol support can send configured purchase and refund events from Magento to GA4. It requires a GA4 Measurement ID and Measurement Protocol credentials, plus coordination with browser tracking to avoid duplicate reporting.

How the Extension Works

1. Connect Your Store and Set Your Tracking Preferences

After installation, enter your GTM container ID in Magento Admin. Choose product identifiers, transaction-value settings, loading preferences, and consent options. Configure any optional Google Ads or Measurement Protocol features you plan to use.

2. Import and Review Your GTM Configuration

Export the container JSON and review it in your GTM workspace. Connect the appropriate GA4 destination and advertising tags, and check for existing scripts or extensions that already send the same events.

3. Test the Shopping Journey Before Publishing

Use GTM Preview and GA4 DebugView to check product interactions, cart changes, checkout, and a test purchase. Confirm item identifiers and transaction values, then publish the verified container. Review tracking again after significant theme, checkout, or consent changes.

Read the Magento 2 Google Tag Manager setup and testing guide for configuration details, or explore documentation and support options.

Key Features

CSP-safe Google Tag Manager and GA4 ecommerce tracking built for Magento 2 and Hyvä storefronts.

  • GTM container inject Load your GTM container with optional deferred loading.
  • GA4 ecommerce events Push view, cart, checkout, and purchase events to the dataLayer.
  • Product identifiers Track by SKU or ID with optional brand and variant fields.
  • Purchase accuracy Include tax, shipping, coupon, currency, and order ID controls.
  • Cookie consent hooks Integrate with common consent managers before firing tags.
  • Ads-ready dataLayer Support Google Ads conversion and remarketing setups in GTM.
  • Container export tools Export GTM container JSON and event documentation from admin tools.
  • Hyvä optimized Built for Hyvä storefronts with CSP-conscious script loading.

Demo

Docs & Support

📘 Documentation

Get started quickly with our detailed user guide. The documentation covers everything from installation to GTM container setup, ecommerce tracking, and advanced configuration.

  • Step-by-step installation instructions
  • Google Tag Manager container configuration
  • Enhanced ecommerce event tracking setup
  • Google Analytics and Ads integration guidance
  • Testing and troubleshooting best practices

💬 Support

Need help? Our Magento experts are here to assist you with setup, configuration, and tracking troubleshooting.

  • Quick and reliable email support
  • Help with installation and GTM setup
  • Troubleshooting tracking and event issues
  • Guidance for Analytics and Ads integrations
  • Regular updates and compatibility support

Reviews

There are no reviews yet. Used Google Tag Manager? Be the first to share how it works for your store.
Write Your Own Review
You're reviewing: Google Tag Manager
Your Rating:
loader
Loading...

You submitted your review for moderation.

Frequently Asked Questions

Why use a Magento Google Tag Manager extension instead of just adding the GTM code?

Adding the GTM code loads your container, but it does not automatically explain what shoppers view, add to their carts, or purchase. Towering Media’s extension supplies structured Magento ecommerce data, giving your analytics and advertising tags the product and order details they need without building a custom dataLayer.

Which parts of the customer journey can I track in GA4?

Track product views, product list interactions, cart additions and removals, cart views, checkout starts, shipping and payment steps, and purchases. The extension also supports events such as sign-ins, registrations, and wishlist additions. These events help you understand which products attract interest and where shoppers leave before completing an order. Event coverage should be validated against your store’s checkout.

Can I use it for Google Ads conversion tracking and remarketing?

Yes. The extension provides ecommerce data for Google Ads conversion tracking and remarketing, including product identifiers and purchase details. You can choose SKU or product ID to align tracking with your product feed. Your Google Ads tags, conversion actions, and remarketing settings still need to be configured and tested.

Can I control how revenue, tax, and shipping are reported?

Yes. Purchase tracking includes order and item details, currency, tax, shipping, and applied coupons. Settings let you exclude tax and shipping from the transaction value where appropriate. This helps your team use a consistent revenue definition when comparing Magento orders with analytics and advertising reports.

Does it work with Hyvä and Luma, and do I need React Checkout Pro?

The extension supports Hyvä and Luma storefronts, with CSP-conscious loading and no RequireJS dependency for Hyvä. React Checkout Pro is optional: the core GTM and GA4 integration works without it. If your store uses a customized checkout, validate its events as part of setup.

Will Google Tag Manager slow down my Magento store?

The extension offers deferred loading, which delays loading the GTM container until a shopper interacts with the page. This can reduce the work done during the initial page load. Performance still depends on the tags in your container, and delayed loading can affect what is recorded before that first interaction.

Does it work with my cookie consent banner?

The extension includes consent integrations for OneTrust, Cookiebot, CookieYes, and custom consent managers. You can configure required consent categories so GTM loading follows the shopper’s choices. Your consent platform and tags must also be configured correctly; installing the extension alone does not establish legal compliance.

How much technical work is needed to set up GA4 tracking?

After installation, enter your GTM container ID and tracking settings in Magento Admin. The extension can export a GTM container JSON file with tags, triggers, and variables, reducing manual setup. Your team should review the import, check for overlapping tags, and test events in GTM Preview and GA4 DebugView before publishing.

Can I keep my existing GTM container and GA4 property?

Yes. You can connect your existing container and property rather than starting over. Before enabling the new tracking, review any old extension, hard-coded GA4 script, or purchase tag that sends the same events. Removing overlapping tracking helps prevent duplicate conversions and inflated revenue.

Does the extension support server-side purchase tracking?

Yes. Optional GA4 Measurement Protocol support lets you send configured events, including purchases, from the server. This can supplement browser tracking, but it requires GA4 credentials and careful coordination with browser events to avoid double-counting. It does not replace consent controls or guarantee that every order appears in GA4.

Technical Specifications

  • Magento Version: Compatible with Magento 2.4.x (Open Source & Adobe Commerce)
  • PHP Version: PHP 8.1–8.3 (composer >=8.1 <8.4)
  • Framework: Built using Magento 2 native architecture (no core overrides)
  • Installation Type: Composer / Manual installation supported
  • Module Dependency: Requires Toweringmedia Base (toweringmedia/module-base)
  • Integration Type: Google Tag Manager Container Integration
  • Tracking Support: Enhanced Ecommerce Events
  • Compatible Platforms: Google Analytics / Google Ads / GTM
  • Container ID Setup: Admin configurable
  • Script Loading: Header / Body container placement
  • Multi-Store Support: Yes
  • Store Scope Configuration: Website / Store View level
  • Tracked Events: View Item / Add to Cart / Checkout / Purchase
  • Checkout Compatibility: Magento native checkout supported
  • Cookie Consent Ready: Can be configured with GTM consent mode
  • Admin Configuration Path: Stores → Configuration → Toweringmedia → Google Tag Manager (Hyvä)
  • Security: No core overrides, Magento standard implementation
  • Performance Impact: Minimal (lightweight implementation)
  • Updates: Ongoing compatibility and feature improvements

Compatible with your Magento 2 store

Compatible with Magento 2.4.x (Open Source and Adobe Commerce) and PHP 8.1, 8.2, and 8.3. Requires toweringmedia/module-base. Configure under Stores → Configuration → Toweringmedia → Google Tag Manager (Hyvä).

  • Magento 2.4.x Open Source & Adobe Commerce
  • Updates & supportKeep your store running smoothly

Ready to Unlock Better Store Analytics?

Track customer behavior accurately, optimize campaigns, and grow Magento 2 sales with Google Tag Manager integration
$79.00

My Cart

Loading...

Customer Login

Checkout as a new customer

Creating an account has many benefits:

  • See order and shipping status
  • Track order history
  • Check out faster