GraphQL Compatible
Rest API
Marketplace Verified

Magento 2 Google Tag Manager (GTM) Extension

*Magento Edition
check60-day Money Back checkFrequent Update checkExtensive Support Timeframe checkInstall via Composer
Compatible with: Community: 2.3.* - 2.4.7 Enterprise: 2.3.* - 2.4.7

Magento 2 Google Tag Manager extension allows stores to edit tags and snippets of code for marketing campaigns and then track the performance easily without having to modify the website's code.

GTM Extension integrates with popular analytics tools like Google Analytics, Analytics Enhanced Ecommerce (GA4), Google Adwords Conversion Tracking, and Facebook Pixel. This simplifies the process of analyzing data to optimize your marketing campaigns effectively.

Additionally, it’s easy to track the performance directly through the setup of Google Analytics eCommerce in our GTM by filling out the tracking ID. You don't need to spend time adding scripts from third-party tools to your websites for those tools to track user actions.

  • Compatible with Magento 2.4.7
  • Compatible with API/GraphQL
  • Simplify the management of Google tags
  • Support dynamic remarketing
  • Include Google Analytics 4
  • Included Facebook Pixel
  • 60+ tag types
  • Available API/GraphQL
  • Use Secure Cookies
  • Want help in Google Tag Manager setup?
  • This extension includes all features of Magento 2 Google Analytics 4

Most-Trusted Pick

  • Work perfectly together
  • Cost-effective
  • 60-day money back guarantee
  • FREE installation for all
Order Export
Order Export
$109.65 ($129)
Advanced Reports



  • 60-day money back guarantee
  • FREE installation for all

Checkout now

Track store metrics with Google Analytics 4

Outstanding features of Google Universal Analytics and Google Analytics 4 (GA4) are well integrated with Magento 2 Google Tag Manager.

Increase Marketing efficiency with Google Ads and Facebook Pixel

The use of Google Ads and Facebook Pixel plays a pivotal role in determining the effectiveness of a marketing campaign. They enable brands to track essential metrics for timely and appropriate adjustments. Understanding this concern, the Mageplaza Google Tag Manager extension allows admins to track Google AdWords conversion, remarketing, and Facebook Pixel.

Improve website performance by simplifying source code

A large amount of source code often negatively impacts page loading speed, leading to reduced site performance and user experience. Therefore, controlling the volume of source code on the site is essential for optimization.

Avoid legal punishment by ensuring data privacy and user consent management

To protect your store from severe punishments (up to €20 million or 4% of the company’s annual global revenue) for failing to uphold user rights on your website, our extension offers multiple solutions to ensure compliance. It provides clear methods for informing visitors about how their data will be used and properly asking for their consent.

How to analyze store performance with Mageplaza Magento 2 GTM with GA4 extension

Explore the module's outstanding features and configuration tutorials to use it effectively to track essential e-commerce events for your store enhancement

Gooogle Analytics opt out (New)

Gooogle Analytics opt out (New)

Track customers' information by your Google Analytics account only when they follow and accept cookies. Properly compatible with GDPR Professional.

Apply filter button

Dimensions & metrics customization (New)

Create new custom tracking dimensions and custom tracking metrics to collect and analyze attributes not automatically tracked by Google Analytics 4.

Vertical and horizontal layered navigation

Enhanced Link Attribution

Allow admins to track each link and calculate the number of customer clicks on the page or product by automatically distinguishing between multiple links that navigate to the same URL on a page.

Overall rating
Your Rating:
Shahid Gill
22 January 2024

We've tried several tag management solutions, and this extension stands out for its simplicity and efficiency. The real-time preview mode and the ability to customize tags for specific pages have made our tracking setup more flexible and reliable.

18 October 2022

very good product , simply does what described and easy to install and configure

22 September 2022

The Google Tag Manager was suggested to us by our SEO managers as it makes easier to work on tags without any particular technical knowledge. we are very happy with it!

19 September 2022

I'm good thanks

13 August 2022

Great Support

26 July 2022

I use this extension for affiliation and it's perfect i select support complete and dev Mageplaza at configured Google Tag Manager for me. Configuration is perfect now. Thank you very much for your work and your help.

Unicorn Denmart
26 July 2022

Google tag manager has been great to use functionality-wise. Mageplaza also provided great support and corporation during the support period, we really hope we can have many amazing products from Mageplaza in future.

SNNR Pvt. Ltd.
06 July 2022

Purchasing the plugin was seamless, Implementation was equally easy as well

SNNR Pvt. Ltd.
06 July 2022

Purchasing the plugin was seamless, Implementation was equally easy as well

Maria Mosso
21 June 2022

All Mageplaza extensions are well documented. No need to ask for support and best quality price.

05 June 2022

A very useful extension at a reasonable price. We are using it since a long time. Satisfied with the extension and the support by Mageplaza. Keep up the good work.

17 May 2022

Because Magento Community does not export e-commerce data to Analytics through GTM, this extension is a must-have.

04 May 2022

A wonderful module if you're currently using Google Analytics for your store. Cheers!

29 April 2022

The support is on point. Thanks for such a timely response.

Michael West
19 April 2022

I am glad and very happy with the customer service of Mageplaza. Your support engineer helped me a lot.

19 April 2022

With only $99, I can enjoy a great Google Tag Manager extension for my store. Plus, the support team has helped me a lot with my first use. I can never complain about such a great service like this.

Stig Hubred
25 June 2021

Great extension that delivers as promised. It provides an easy way of handling e-commerce tracking. We use it for Google Ads and Facebook and it works without problems. We are using several extensions from Mageplaza (Layered navigation, Product feed, Facebook plugin, etc.) and they always deliver work of high quality and extensions of great value.

Jaimie Dijstra
08 June 2021

For its price this is a great extension, works out of the box, extremely simple to install with the bare-bone basics of tag manager analytics, etc. The only thing missing from it is instructions on tag manager full setup such as a JSON file import to google tag manager, tag manager is a hurdle in itself to set up the events tags and triggers for advanced tagging. If this came with the extension It would add a lot more value to the extension. Still, despite this gripe(!), I'm very happy with the extension and with the price tag as it is I'm giving it 5 stars!

Senthilkumaran S
19 May 2021

A useful extension to add an Ecommerce Tracking feature in Magento for GMC and Facebook Pixel, looking forward to getting more platforms integrated

28 April 2021

So far it works really well for our Facebook pixel. Everything seems greatly automated. For my taste, it could be a bit more granular in the near future, but I am sure there will be plenty of good updates coming.

faraz bashir
16 April 2021

Very Helpful extension for Magento 2 website. I have installed this extension and this extension excellent Work With all Platform Google tag manager, Google analytics, google adword, and Facebook pixel. Dear Mageplaza Team please also add other platforms pixel, Snapchat, Pinterest and Twitter, etc

faraz bashir
16 April 2021

Best Extension For Magento 2 Stores. All in one extension for Facebook Pixel, Google Tag Manager, and Google analytics. Easy to configure. This extension is perfectly working with all platforms. Mageplaza all module is best and very helpful

19 March 2021

Useful extension - allow to configure tags for GTM, flexible settings, working perfectly with Facebook Pixel and Enhanced Ecommerce. Easy installation with composer, perfectly compatible with other Mageplaza modules. Thank you very much!

Kévin H.
17 February 2021

Very good module. Allowed us to set up a tagging plan in a few days.

05 January 2021

The extension is OK but e were hoping for a lot more - It only has the basic tracking for Facebook and Google Analytics. All things like adds to wishlist and swatch requests (specific to our site) all had to be done by ourselves in GTM. Also no support for Google Ads which I was expecting. If you just need basic eCommerce tracking for Facebook and Google analytics then it is good, but if you need more then better to just do everything yourselves.

14 December 2020

Easy to configure. Thanks!

18 November 2020

Very good extension, very useful and very simple to use.

20 September 2020

The extension was easy to install and configure. The documentation is pretty good. Nice and tidy fix for handling tag manager and Facebook pixel in one place without having to do any coding.

18 September 2020

I bought the Mageplaza extensions on the tenth September 2020, it was a sunny day and I like it, My webmaster asked me to buy this extension and it was a good idea. Anyway we are now using the extension and it's GOOD

07 September 2020


18 June 2020

The extension is great and easy to use !

28 November 2019

Purchased this extension and it works like a charm. support team was very helpful and fast. Highly recommend Mageplaza extensions!

29 October 2019

I had some issues with getting a ticket started but once I was in touch with the technical team everything went smoothly.

26 July 2019

Shin, my technical supporter was extremely helpful and prompt to identify the issue and provide a fix. Awesome job! I hope these fixes make into the later releases of the extension.

16 July 2019

What a great support! Detail-oriented, accurate, straight to the point and solve the problem. I couldn't believe that it solved that fast.

Thomas André Jensen
30 May 2019

Really great and friendly customer service! I worked with you guys for only 1 day and the issue is sorted fast. Will recommend you to others!

03 May 2019

Awesome quality, wonderful extension! Google Tag Manager plugin works great and does what it says on the tin, definitely, I will recommend this module.

14 April 2019

The installation was a smooth and painless process and worked straight away. Currently, it works exactly as I expected. Worked seamlessly when I upgraded the core Magento too.

17 March 2019

This is a very important extension that I was looking for in a while, Mageplaza met my expectations and the price tag was awesome too. Thanks, guys for your hard work.

Xu lanlei
12 March 2019

Exceptional customer support! Based on the support provided by Eric and his team Mageplaza has earned a new loyal customer. Thank you very much once again, great job!

26 February 2019

Install module, add the google tag manager ID, done! Well, not exactly, you need to configure your tags in your Google account but that is another story. I am using Magento 2.3

22 February 2019

The extension is very good, easy to use and easy to install. It does the job. The support team is also very fast. I can recommend.

15 January 2019

Our developer was able to get support assistant right away. The extension works great on our clients Magento site. Thank you for all your help.

05 December 2018

I wish Mageplaza made more Magento extensions. I have used both their SMTP and this Google Tag Manager extension. They work perfectly. I wish they made an extension to turn Magento into a Marketplace. I purchased Webkul's extensions for that and their quality doesn't even come close to Mageplaza's. Maybe it's that Mageplaza focuses on much smaller extensions to ensure they get everything right but I can definitely tell the difference in quality. I used this Google Tag Manager extension to enable Facebook Pixel on my site and it's great. I didn't have to embed any code in my application and Facebook pixel auto detects events like Add to Cart and Purchases and Google Tag Manager wires it all together with the help of this little gem.

26 October 2018

Google Tag Manager plugin works great and does what it says on the tin, definitely, I will recommend this module. The installation was a smooth and painless process and worked straight away.

13 October 2018

It was very easy to install and setup. Currently, it works exactly as I expected. Thanks, Mageplaza. I would recommend this great module to everyone.

02 August 2018

This is a must-have tool for every store. Everything works as promised, this extension works great, much better than free extensions for Google Tag Manager. Also, the good documentation of this extension helps too. I will be a loyal customer for a long time!

Yusuf Wadee
19 April 2018

Very good service. My issues were resolved quickly and extensions are working

Jonathan Cunliffe
02 April 2018

Very responsive support. Thanks

23 March 2018

This extension is very helpful and works well. The support is very good. The installation is very easy. The module is very simple to configure. I recommend for every one to use any extension of Mageplaza.

16 March 2018

Great extension that makes it really easy to work with Google Analytics and AdWords. Makes work easier for my employees. Simple installation and very good manual. I ordered more extensions and had a positive experience everywhere.

06 February 2018

I need a tool that would let me track multiple ad campaigns as to pay for our affiliates. With this I am able to attribute properly every single different ad campaign and pay my marketers accordingly.

01 February 2018

This is extension is very good and helps SEO on Google. Helps in marketing as well. Thanks to Magaplaza for introducing this extension. Overall this extension is excellent and very easy to install. Great!

14 December 2017

Very smooth, all you have to do is put in your tracking id, and there are some configurations, thanks to their great documentation i was able to set this up smoothly and now analytics is tracking the site effectively! love it, great work MP! loyal customer for long!

14 October 2017

This extension makes it easier for advanced tracking and integrating with google tag manager. Installation was easy and I am happy with it. Thank you, Mageplaza. Keep up the good work!

04 October 2017

Its very necessary, I needed to enable Google Tag Manager for my Magento store. Then I came across this free extension. and In minutes, I was able to install and use this extension. There is a minor issue with setup, I resolved by myself.

23 September 2017

I needed to enable Google tag manger for my magento store. Then I came across this free extension. and In minutes, I was able to install and use this extension. Worked very well for me. A must have extension if you wish to enable GTM on your magento store..

Rosa Royalfern.
22 August 2017

At that miserable time, I was just a newbie to Magento 2 who had no idea about Adwords and Google Analytics and HTML stuff and so on at the same time. Everything was a true mess. Until one of my partners recommended me to try Mageplaza's extensions and luckily it's free so I immediately checked it out like Ihavenothingtolose :d Then things turned out pretty ok, the modules are easy to understand and configure. I did figure out that remarketing is basically necessary for every store. Fortunately, Google Tag Manager supported me on this issue really quickly. One more cup of tea in here that I'm no longer maintaining tons of usual code on the source of our website, mostly for the time being I just need this extension only to handle all my current script-tags. Again, thanks Mageplaza for granting me this good chance to practice!

19 August 2017

This was very helpful for us. We were trying other tag manager but this was good. Installation was also easy when compared to the other extension available in the market. Overall the product was awesome.

All of the feature updates plan and status will be updated as soon as possible in our public Trello.

View Mageplaza Extension Roadmap 2023 ->

Don't see the features you are looking for?

Request feature

Want to do extension customization?

Custom request

Let us know your requirements

  • Compatibility: The extension is now compatible with Magento 2.4.7
  • New Feature: We added to show Event for Facebook Pixel

  • 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

  • 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

  • Compatibility: The extension is now compatible with Magento 2.4.5
  • Bug Fix: We fixed a minor bug which Datalayer

  • New Update: We added setup database schema XML

  • Compatible with Magento v2.4.5

Fixed minor bugs

Fixed minor bugs

  • New feature: create & export tag, trigger, variables

  • New feature: create & export tag, trigger, variables

  • Compatible with Magento v2.4.4

  • Added Google Analytics Opt out
  • Added Tracking custom dimensions and metrics
  • Compatible with Mageplaza GDPR

  • Added Google Analytics Opt out
  • Added Tracking custom dimensions and metrics
  • Compatible with Mageplaza GDPR

  • Supported RestAPI & GraphQL
  • Added Advanced Matching & Add To Wishlist event for Facebook Pixel
  • Fix minor bugs

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

  • Compatible with Magento v2.4.3

  • Fixed minor bugs

  • Fixed minor bugs

  • Fixed minor bugs

  • Compatible with Magento v2.3.7
  • Fixed minor bugs

Magento 2 Google Tag Manager is an essential module that allows stores to modify tags and snippets of code easily without having to add many complex source codes. The demand for GTM extension is especially high when operating marketing campaigns, which normally require a lot of complicated and lengthy codes to run.

There are big differences between these two. We can consider the M2 GTM extension as a more advanced version of GTM. While the module is easy to use, GTM requires experienced developers to handle it. Additionally, M2 Google Tag Manager by Mageplaza is also integrated with GA4 to bring better efficiency.

First of all, you need to install our extension. Then, follow our step-by-step instructions here. In case you find it too complicated or just simply don't have time to set it up by yourself, we are pleased to offer our Install & Setup Google Tag Manager Service.

Yes, you can totally do this. First, you have to create a Google Ads account, then go to the Google Adwords Conversion Tracking section in the Google Tag Manager module’s backend, and click on the guide link.

To install the Google Analytics script in Magento 2, follow these steps: Step 1: Sign up for a Google Analytics account if you don't already have one. Step 2:In the Magento Admin Panel, go to Stores > Configuration > Sales > Google API. Step 3: Under the Google Analytics section, enable the integration and enter your Google Analytics Tracking ID. Step 4: Save the configuration. Step 5: Preview and test your Google Tag Manager setup before publishing it live. Step 6: Flush the Magento cache to ensure the changes take effect.

First of all, doublecheck if you've done the configuration process correctly or missing any step. If everything is alright, the reason might be you're using the old version, so update it to the latest ver immediately. Each new release can contain bug removal or performance improvement. To download the latest ver, login to your account, check the products you bought, and you will see the latest version to download there.

While GTAG is just an easy-to-use single tracking code, Tag Manager is a more complex tool that allows you to manage all of your tracking codes in one place. In reality, people tend to use Tag Manager more than GTAG.

Actually, one of many Google Tage Manager benefits is improving page speed by loading tags asynchronously and reducing the huge amount of source codes for Google Analytics and AdWords.

It might take up to 48 hours for your data to start being transferred into GA. While waiting, you can check if your configuration from the product page has worked properly.

Yes, we use it for events, that can't handle with the Datalayer, like add_to_cart, remove_from_cart, refund.

Besides including modules in the Ultimate GTM version like Google Analytics, Facebook Pixel, and GTM are also compatible with create a Google Ads accountGDPR and One Step Checkout.

Magento 2 Google Tag Manager's Full Features

General configuration

  • ID variable base on ID or SKU
  • Allow excluding tax from transaction
  • Allow showing/hiding the brand, variant
  • Allow excluding shipping from transaction
  • Allow excluding shipping Tax from transaction
  • Allow excluding orders with 0 value

Other Features

  • Support GA4
  • Measurement ID
  • Facebook Pixel Implementation
  • Google Analytics Opt Out
  • Custom Dimensions & Metrics
  • API: Export JSON files for tags, triggers, variables (New)
  • Use Secure Cookies
  • Track product impressions and clicks by position in the Related, Up-sell, Cross-sell section, and Search Result Page
  • Ajax Add To Basket
  • Google Tag Manager Javascript Code
  • Google Tag Manager Non-Js Code
  • Order Success Page Total Calculation


  • Auto-fit with every device (Mobile, Tablet, PC)
  • Support multiple stores
  • Support multiple languages
  • Fully compatible with Mageplaza extensions
  • Free support included within the subscription period
  • 60 days guarantee money back


  • Shopping behaviour report
  • Checkout behaviour report
  • Product performance report
  • Sales performance report
  • Product list performance report

GTM Featured tags

  • Universal analytics
  • Classic Google analytics
  • Google Ads conversion tracking
  • Google Ads remarketing
  • Client ID tracking / user ID tracking
  • Promotion tracking
  • IP anonymization
  • Enhanced link attribution
  • DoubleClick floodlight counter
  • DoubleClick floodlight sales
  • Google optimize
  • Custom HTML tag
  • Other 60+ tag types
  • - AB TASTY Generic Tag
  • - Adometry
  • - AdRoll Smart Pixel
  • - Audience Center 360
  • - AWIN Conversion
  • - AWIN Journey
  • - Bizrate Insights Buyer Survey Solution
  • - Bizrate Insights Site Abandonment Survey Solution
  • - ClickTale Standard Tracking
  • - comScore Unified Digital Measurement
  • - Crazy Egg
  • - Criteo OneTag
  • - DistroScale Tag
  • - Dstillery Universal Pixel
  • Eulerian Analytics
  • Google Trusted Stores
  • Hotjar Tracking Code
  • Infinity Call Tracking Tag
  • Intent Media - Search Compare Ads
  • LeadLab
  • LinkedIn Insight
  • Lytics JS Tag
  • Marin Software
  • Mediaplex - IFRAME MCT Tag
  • Mediaplex - Standard IMG ROI Tag
  • Bing Ads Universal Event Tracking
  • Mouseflow
  • AdAdvisor
  • DCR Static Lite
  • Oktopost Tracking Code
  • Optimise Conversion Tag
  • Perfect Audience Pixel
  • Personali Canvas
  • Placed
  • Pulse Insights Voice of Customer Platform
  • Quantcast Measure
  • Turn Data Collection
  • SaleCycle Pixel Tag
  • SearchForce JavaScript Tracking for Conversion Page
  • SearchForce JavaScript Tracking for Landing Page
  • SearchForce Redirection Tracking
  • Survicate Widget
  • Tradedoubler Lead Conversion
  • Tradedoubler Sale Conversion
  • Turn Conversion Tracking
  • Twitter Universal Website Tag
  • Upsellit Confirmation Tag
  • Upsellit Global Footer Tag
  • Ve Interactive JavaScript
  • Ve Interactive Pixel
  • VisualDNA Conversion Tag
  • Xtremepush - Web Push & Onsite Engagement
  • Yieldify


Choose your suitable edition.


Crafted for a great webstore start $ 149 first year

  • 1-year extension updates
  • 1-year support
  • 60-day money-back guarantee
  • Read our policies
  • Support Magento 2 Community Eddition

Enterprise/ Magento Cloud

Great for an enterprise solution $ 349 first year

  • Free updates within subscription time
  • Free support within subscription time
  • Read our policies
  • Support Magento 2 Enterprise Eddition
*Magento Edition
check60-day Money Back checkFrequent Update checkExtensive Support Timeframe checkInstall via Composer
Compatible with: Community: 2.3.* - 2.4.7 Enterprise: 2.3.* - 2.4.7

Why choose Mageplaza Magento 2 Google Tag Manager

The extension is a must-have tool for marketers, allowing them to track marketing campaign performance effectively while guaranteeing website health. Owning GTM for Magento 2, merchants not only get the ability to edit tags and snippets of code and then track them easily without having to modify the website's code but are also able to use integrated popular analytics tools, including Google Analytics 4, Google Adwords Conversion Tracking, and Facebook Pixel.

Google Tag Manager image Google Tag Manager image Google Tag Manager image Google Tag Manager image Google Tag Manager image
60-day Money Back

60-day Money Back

Extensive 60-day money-back period. You love it or get a full refund no questions asked.

Extensive Support

Extensive Support

Mageplaza provides support 16 hrs/day, 5.5 days/week to guarantee the seamless operation of our extensions on your store.

Install via Composer

Install via Composer

ESimple installation via composer helps you save time and eliminates technical issues during future updates.

Frequent Updates

Frequent Updates

Intensive update roadmaps ensure great performance, bug-free, highly compatible, and innovative extensions.