Google Analytics 4 with GTM Support for Magento 2 New version
How GTM and GA4 Work Together
GTM sets up and sends events from your website, while GA4 receives those events and turns them into reports and insights. Together, they give you a complete view of customer behavior and store performance, from tracking actions to analyzing results.
Stop Struggling with Manual Setup for GTM & GA4
Set Up Faster with Preconfigured Events
Setting up GA4 manually means creating every event and tag from scratch, which takes time and often leads to errors. Mageplaza’s GTM extension for Magento 2 offers JSON templates with pre-built key eCommerce events (sendPageView, view_item, add_to_cart, purchase, sign_up, etc.). Import them into GTM and start tracking customer behavior in GA4 instantly.
Measure Store Performance with GA4 Insights
With GA4, you get a full picture of your store’s overall performance. From customer journeys to product sales and site activity, all key data is measured in one place. These reports show what’s working well and where you can make adjustments.
Customer Behavior
Product Performance
Traffic & Engagement
Smarter Marketing & Data Compliance
With Mageplaza’s GTM extension, you can connect GA4 with powerful marketing tools and ensure data is handled the right way. From Google Ads and Facebook Pixel to Google Consent Mode v2, these integrations make your campaigns smarter and your store fully compliant.
Implement dynamic remarketing
Support Facebook Pixel
Ensure user consent New
Additional Features of Magento 2 Google Tag Manager & GA4
Support 60+ tags
Improve website performance
Customize dimensions & metrics
Enable Google Analytics opt-out
Enhance link attribution
What customers say about us
Release notes
-
(Magento v2.3.x)
Frequently Asked Questions
Absolutely! GTM helps you manage tracking codes and events without needing complex code, while GA4 provides essential metrics for analyzing store performance. Together, they provide powerful insights that drive eCommerce success.
The differences between these two are quite big, actually. The Mageplaza GTM extension simplifies tag management by providing an easy-to-use interface. Unlike GTM’s manual setup, this module auto-generates tags, triggers, and variables, saving you time and minimizing errors. It also integrates directly with GA4 to improve efficiency.
Mageplaza’s GTM extension simplifies setup by automatically generating JSON files with pre-configured tags and events. This means you don’t need to manually add code or tags, saving you hours of work and ensuring accurate tracking right out of the box.
To track Google Ads activities, first create a Google Ads account, then navigate to Google Ads Conversion Tracking in the Mageplaza GTM extension’s backend. Follow the detailed instructions provided to link your Google Ads with GTM and GA4 for precise conversion tracking.
Follow the steps below:
- Login Google Analytics account (or create a new account if you haven't got one)
- Navigate to admin panel in backend > Stores > Configuration > Sales > Google API
- Under the Google Analytics section, please enable the integration
- Enter your Google Analytics Tracking ID
- Save config
- Remember to preview and test your Google Tag Manager setup before publishing it
- Clear cache
If your Google Analytics 4 with Google Tag Manager support extension isn’t tracking, double-check that you’ve completed the installation and configuration steps correctly. If everything looks fine, try updating the extension to the latest version to ensure compatibility with your Magento version. Also, check for any GTM container errors in the browser console.
GTAG is a single tracking code for a specific tool (like Google Analytics or Ads), while Tag Manager (GTM) is a tool to manage all your tracking codes in one place. GTM simplifies and organizes multiple tracking tools, making it easier to manage all your marketing tags without needing to edit code directly.
The answer is yes. GTM helps improve page load speed by reducing the need for multiple tracking codes directly in your Magento theme. With GTM, tracking scripts are loaded asynchronously, so your website loads faster, improving both user experience and SEO performance.
This is a common question, but don't worry; there's nothing wrong at all. It may take up to 48 hours for data transfer into GA4, so please be patient. In the meantime, you should check your configuration again to make sure everything is correct. Use GTM’s Preview mode and GA4’s real-time reporting to confirm events are being tracked.
There are basic steps that you need to follow before adding GA4 in Magento 2, such as:
Before adding GA4 to your Magento 2 store, please prepare several things below:
- Create GA4 Property
- Get Measurement ID
- Create a GTM Account and Container
- Locate Public, Account, and Container ID
Once you have got these elements prepared, please follow our detailed instructions.
To collect eCommerce data in GA4, you need to add eCommerce tracking events to your GTM container. With the Mageplaza GTM extension, these events are pre-configured, so you only need to enable them in your backend, and GA4 will automatically start tracking key metrics like product views and purchases. For more information, please check our Google Tag Manager installation guide.
Yes, Google Analytics 4 with GTM Support is compatible with Hyva theme & Hyva Checkout. However, if you still want to use the Luma Checkout, you can enable it by following this guide.
Pricing
Community
$149 first yearEnterprise/ Magento Cloud