Free installation badge Product image of Google Analytics 4 with GTM Support
Standard
User Guide
Instruction
How to use
Magento Edition *
Version *
FREE installation Tooltip
SAVE 50%
Ends in:
03 : 00 : 00 : 00
Get 10% OFF
$149
icon logo magento 2.4.4 - 2.4.8
Tooltip
Hyva logo Theme & Checkout
Tooltip

Google Analytics 4 with GTM Support for Magento 2 New version v4.7.4

5.0
(61 reviews)
Read all >
Mageplaza Google Tag Manager with GA4 extension for Magento 2 helps merchants unlock powerful insights by sending accurate store data into GA4. From tracking customer journeys and product performance to analyzing traffic, campaigns, and promotions, it delivers the reports you need to grow sales, optimize marketing, and make smarter business decisions.
tick icon
Compatible with Hyva theme (view demo)
tick icon
Compatible with Hyva Checkout
tick icon
Compatible with Magento 2.4.8
Free Installation
60 days money back guarantee

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.

How GTM integrates with GA4 for tracking and reporting events.

Stop Struggling with Manual Setup for GTM & GA4

Why set up GTM and GA4 with Mageplaza extension over manual method

Set Up Faster with Preconfigured Events

Set up GTM, GA4 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.

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

Magento 2 Google Tag Manager with GA4 enables dynamic remarketing through Google Ads. The extension pushes accurate store data to build remarketing audiences and measure conversions. This lets you retarget shoppers with the right products, improve ad performance, and boost return on ad spend (ROAS) effectively.

Support Facebook Pixel

The Mageplaza extension also supports Facebook Pixel integration through GTM, without manual coding. This means you can track conversions, build remarketing audiences, and optimize Facebook Ads campaigns easily. With Magento 2 GA4 and Facebook Pixel combined, your advertising strategy becomes smarter and more effective.

Ensure user consent New

Magento 2 Google Tag Manager with Google Analytics extension fully supports Google Consent Mode v2. It ensures user data is collected responsibly by asking for consent before tracking. This feature helps your store comply with GDPR and privacy laws while keeping GA4 insights accurate and reliable.

Additional Features of Magento 2 Google Tag Manager & GA4

Support 60+ tags

Tag is one of the three key elements that Google Tag Manager works with: Tag, Trigger, and Variable. More particularly, it's a piece of code running in your page structure, used to send data to other systems like Google Analytics 4.
With our Magento 2 GTM extension, you can set up and manage over 60+ popular tags to match your marketing strategy. Supported tags include Google Ads, Crazy Egg, Floodlight, Pinterest Tag, and Quora Pixel.

Improve website performance

Google Tag Manager centralizes all tracking scripts into one container, keeping your Magento store lighter and easier to maintain. With Mageplaza’s extension, you can manage all GA4 and marketing tags in GTM without touching your site’s code, reducing the risk of errors and improving long-term performance.

Customize dimensions & metrics

Our module allows you to create brand new custom tracking dimensions and metrics to collect and analyze the attributes that are not automatically tracked by GA4. Therefore, you can gain deeper insights into specific customer behaviors, tailor reports to your business needs, and make more data-driven decisions for optimizing your store's performance.

Enable Google Analytics opt-out

When shoppers visit your GDPR-compliant website, this feature will protect and sync their data to GA4, providing you more neccessary information of customers. (Properly compatible with GDPR Professional.)

Enhance link attribution

Google Tag Manager with GA4 goes beyond basic click tracking. It can tell you exactly which link a customer clicked, even if multiple links point to the same page. For example, you’ll know whether shoppers clicked a “Buy Now” button, a banner, or a menu link, helping you optimize page layout and calls to action.

What customers say about us

Product reviews: 61
Overall rating: 5.0
5
4
3
2
1
How much do you like this product?
Leave your email to get reward points for reviews
Submit a relevant review of 30+ words to earn 5 reward points (one-time per extension)
Gursaant Singh
18 March 2025
Verified purchase
Gursaant Singh
18 March 2025
Verified purchase
Shahid Gill
22 January 2024
Verified purchase
Ramez
18 October 2022
Verified purchase
Leonardo
22 September 2022
Verified purchase

Release notes

  • v4.7.4 (Magento v2.4.x)

    24 August 2025

    • Bug Fix: Fixed issue where orders could not be refunded if a product had no category assigned
  • v4.7.3 (Magento v2.4.x)

    11 July 2025

    • Compatibility: Now compatible with Hyva Checkout
  • v4.7.2 (Magento v2.4.x)

    14 April 2025

    • Compatibility: Now compatible with Magento 2.4.8
    • Bug Fix: Fixed cannot add to cart
    • Update: User guide link of Extension
  • v4.7.0 (Magento v2.4.x)

    12 August 2024

    New Feature: We added Google Consent v2 for Google Analytics 4

  • v4.6.1 (Magento v2.4.x)

    03 May 2024

    • Compatibility: The extension is now compatible with Magento 2.4.7
    • New Feature: We added to show Event for Facebook Pixel
  • v4.6.0 (Magento v2.4.x)

    26 December 2023

    • New Feature: We added “Show Events” field into group “Google Analytics 4”
    • Compatibility: The extension is now compatible with PHP 8.1
    • Compatibility: The extension is now compatible with Mageplaza GDPR in Ga4
    • New Update: We updated config
    • New Update: We updated the following event add to cart, remove from cart
    • New Update: We updated event add to wish list, event Customer Login After, event Order refund, event Add shipping, event Add Payment, event add_to_cart for “add all to cart” wishlist, Search event in Ga4 and FB Pixel
    • New Update: We updated Custom Dimensions, and Custom Metrics in Ga4
    • New Update: We updated Track Impressions and Clicks By Position in Ga4
    • New Update: We updated the missing code of the event Customer Login After in GA4
    • New Update: We updated compa event add_to_cart with module Mageplaza Osc in GA4
    • New Update: We updated the template for the new event
  • v4.5.0 (Magento v2.4.x)

    23 March 2023

    • Compatibility: The extension is now compatible with Magento 2.4.6
    • New Feature: We added track product impressions and click by position in the Related, Up-sell, and Cross-sell section
    • New Feature: We added track product impressions and click by position in the Advanced Result Page
  • v4.4.4 (Magento v2.4.x)

    30 January 2023

    • Compatibility: The extension is now compatible with Magento 2.4.5
    • Bug Fix: We fixed a minor bug which Datalayer
  • v4.4.3 (Magento v2.4.x)

    04 November 2022

    • New Update: We added setup database schema XML
  • v4.4.2 (Magento v2.4.x)

    07 September 2022

    • Compatible with Magento v2.4.5
  • v4.4.1 (Magento v2.4.x)

    17 August 2022

    Fixed minor bugs

  • v2.6.1 (Magento v2.3.x)

    17 August 2022

    Fixed minor bugs

  • v4.4.0 (Magento v2.4.x)

    29 July 2022

    • New feature: create & export tag, trigger, variables
  • v2.6.0 (Magento v2.3.x)

    29 July 2022

    • New feature: create & export tag, trigger, variables
  • v4.3.1 (Magento v2.4.x)

    09 June 2022

    • Compatible with Magento v2.4.4
  • v4.3.0 (Magento v2.4.x)

    15 April 2022

    • Added Google Analytics Opt out
    • Added Tracking custom dimensions and metrics
    • Compatible with Mageplaza GDPR
  • v2.5.0 (Magento v2.3.x)

    15 April 2022

    • Added Google Analytics Opt out
    • Added Tracking custom dimensions and metrics
    • Compatible with Mageplaza GDPR
  • v2.4.0 (Magento v2.3.x)

    28 February 2022

    • Supported RestAPI & GraphQL
    • Added Advanced Matching & Add To Wishlist event for Facebook Pixel
    • Fix minor bugs
  • v4.2.0 (Magento v2.4.x)

    28 February 2022

    • Supported RestAPI & GraphQL
    • Added Advanced Matching & Add To Wishlist event for Facebook Pixel
    • Compatible with Magento v2.4.3-p1
    • Fix minor bugs
  • v4.1.3 (Magento v2.4.x)

    26 October 2021

    • Compatible with Magento v2.4.3
Load More

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.

Magento Edition *
Version *
FREE installation Tooltip
SAVE 50%
Ends in:
03 : 00 : 00 : 00
Get 10% OFF
$149
icon logo magento 2.4.4 - 2.4.8
Tooltip
Hyva logo Theme & Checkout
Tooltip

Pricing

Choose your suitable edition.

Community

$ 149 first year
Includes support & updates for 1 year Tooltip
60 days money back guarantee
Read our policies
check
Support Magento 2 Community Eddition

Enterprise/ Magento Cloud

$ 349 first year
Includes support & updates for 1 year Tooltip
60 days money back guarantee
Read our policies
check
Support Magento 2 Enterprise Eddition
check
Highest priority support
Can't see the feature you're looking for?
Describe it and we will customize this extension to suit your needs!
Request customization
feature looking icon