Magento 2 Google Tag Manager & Facebook Pixel

View Demo

The Google Tag Manager & Facebook Pixel extension is a simple way to get eCommerce Tracking in Google Analytics for your store. Get in-depth reports on your customers' behavior while they are shopping. See the bottlenecks of the shopping process in your store.

  • Track the in-store behavior of your customers and watch their shopping journey step by step with Ecommerce Tracking in Google Analytics & Facebook
  • Easily integrate tracking tags with custom blocks on the store pages with markup markers
  • Support for standard Google Analytics 3 and enhanced Google Analytics 4 (GA4) tracking
  • Support enhanced e-commerce events for Facebook Pixel
  • Enhance your store analytics by adding custom dimensions and metrics for gathering statistics
Hyvä compatible

The extension is compatible with the Hyva theme.
Frontend Demo


Ecommerce Tracking in Google Analytics can help a store increase its revenue. However, adding Ecommerce Tracking to the default Magento 2 requires a lof of work from developers and makes the store support more expensive in the future.


With the Google Tag Manager module, any Magento 2 store owner can easily activate Ecommerce Tracking in Google Analytics without a deep technical knowledge. Monitor customers actions in your store to see when congestion occurs during purchases.

What benefits does the Google Tag Manager bring to your store?

In-depth customer tracking In-depth customer tracking
Optimize marketing ROI Optimize marketing ROI
No coding skills required No coding skills required

Google Tag Manager main features

  • No manual code editing needed to add Google Tag Manager
  • Apply custom tracking dimensions and metrics
  • Simple integration with custom blocks in your store's frontend
  • Implement Google Analytics 4 for extended reports
  • Measure how often products are viewed by users
  • Monitor events for customer groups and product variants

View the customer's shopping journey

Using Google Tag Manager, you get Ecommerce Tracking in Google Analytics. This allows you to track almost every customer action in your store.

Know what products customers are viewing, add or remove items from the shopping cart, etc. Use this information to enhance your marketing and your store's design.

Google Tag Manager

Google Analytics 4 (GA4) support

The extension is primarily designed to implement first-class integration between Magento 2 and Google Analytics 4 through Google Tag Manager.

Furthermore, the extension supports Google Ads remarketing by integrating with Google Tag Manager.

home analytics

The extension supports all Google Analytics 4 enhanced ecommerce events:

  • Product List Views view_item_list
  • Product List Clicks select_item
  • Product Detail Views view_item
  • View Shopping Cart view_cart
  • Adds/Removes from Cart add_to_cart, remove_from_cart
  • Checkouts begin_checkout
  • Adds payment info add_payment_info
  • Adds shipping info add_shipping_info
  • Purchases purchase
  • Promotion Views view_promotion
  • Promotion Clicks select_promotion
  • Adds to wishlist add_to_wishlist

Custom dimensions and metrics

Get deeper insights on your customers' behavior by uploading non-standard data to your Google Analytics reports.

Add custom dimensions and metrics to send to Google Analytics almost any information available on the page of your store. Use special price, SKU, Tax class, Dynamic weight and other attributes as custom dimensions and metrics to make your Google Analytics reports more valuable.

Additionally, you can track brands, product variants, customer groups.

google analytics custom dimensions

Track custom blocks in Google Analytics

Get statistics on custom blocks with products in your store. Know when a user is shown items or offerings and when he or she selects one of the proposed products.

With our extension, your store gets the ability to send to Google Analytics such data as view_item_list, view_item and select_item for custom block tracking. It can be, for example, a custom block of cross-sell products.

google tag manager ecommerce magento

No coding required

With the Google Tag Manager extension, adding GTM service to your store is as simple as copy-pasting. You will not be required to edit the source code of your store to add GTM code snippet.

Without Google Tag Manager module, you will need to edit several phtml templates of your design theme and figure out how to load them on your store frontend.

google tag manager ecommerce magento

Debug toolbar

Know exactly what information is transferred to Google Analytics on every triggered action.

Use the built-in Debug toolbar our Google Tag Manager extension provides to see the collected data on each monitored event.

google tag manager ecommerce magento
See it in action!
Pick a quick tutorial to learn about various aspects of this extension
Customer Reviews 18
Write Your Own Review

You submitted your review for moderation.

Good but limited
EV Verified Buyer Bergschenhoek, Netherlands
Extension is fine, Mirasvit support is excellent as always. All in all this does what it says. The only disadvantage is that chatgpt3.5 is really not that smart so do not expect miracles on descriptions generated, would love to have this working with GPT-4.
It does its job
Erkan Verified Buyer Istanbul, Turkey
It does its job
Works well with GA4
Jerry Verified Buyer Walnut, United States
Purchased this extension to have it work with GA4, and so far so good. It seems to be able to pass the appropriate click events to GTM. I see continuous updates on this extension which gives me comfort that the team is continuing to improve this extension as we get closer to GA4 mass adoption.
Extremely useful and easy to set up
Jerry Verified Buyer Walnut, United States
Integrating GA and Adwords with the extension makes everything so much easier. It's practical and does the job very well.
Our favourite GTM Magento module
Davide Verified Buyer Pavia, Italy
It's an excellent module, and we use it for all our Hyvä projects
Working as Expected
Alex Verified Buyer Bowie, United States
Before this purchase, I already tried multiple tag manager modules but this one is working perfectly and mirasvit support is also fantastic with this.
Does the work
Faisal Verified Buyer Bahrain
Amazing extension, It does exactly as advertised & comparing it with other extensions that I used, this has many features.
Robert Verified Buyer Vinosady, Slovakia
WE use this plugin for our customers, works great. Excellent feature is importing container to GTM - saves mi lot of time. Thanks a lot!
Installed also: Order Management M2
Smooth installation and easy usage
Louis Verified Buyer Grimbergen, Belgium
Installation went very well and plugin tracks users consistently.
Great choice
FranFabrico Verified Buyer Sesto San Giovanni, Italy
We are an agency, we bought this module multiple times. Solid solution!!
Great Plugin
Xubee Verified Buyer Durban, South Africa
Very well designed and great for marketing. Thanks, Mirasvit.
Manual & Support
Need more help?

Save time by starting your support request online and we'll connect you to an expert.

Contact Us Now
Frequently asked questions

What is the purpose of the Google Tag Manager?

Google Tag Manager (GTM) is a service launched by Google that provides website owners with a tool to simplify tracking for events. In the case of an eCommerce store, such events can be an added product to the cart, a viewed item in the catalog, added shipping information, etc.

This tool provides store owners with a simple user-friendly interface accessible in the browser. Using the google tag manager, eCommerce service store admins can easily manipulate tracking tags without a deep technical knowledge and source code editing.

GTM in general has the following parts:

  • Tag, which is a piece of code, usually based on JavaScript that is added to a store page
  • Triggers are used to launch tag execution on specific event
  • Variables keep information from tags and triggers

Tracking is done through those code snippets. Users of Google Tag Manager can create multiple tags for different events they would like to track. Gathered data then can be directly sent to analytic services like Google Analytics to get enhanced reports on events in a Magento 2 store.

Why is it better to use the Google Tag Manager extension for Magento 2?

With Google Tag Manager, as a store owner, you can get detailed statistics on various events in his or her store. Such data can be used to improve marketing campaigns in your store. With Google Tag Manager, it becomes possible to measure the audience and its behavior, retargetting marketing initiatives. It is a great tool for every store to increase sales and revenue.

Default Magento 2 has a built-in support for Google Tag Manager. However, it is limited to the Magento 2 Adobe Commerce edition, which is aimed at enterprise clients. Those Magento 2 stores that use Magento Open Source edition are not provided with built-in support for Google Tag Manager.

In order to get a Google Tag Manager support, users of Magento Open Source edition can either edit the source code of their frontend layout theme, or they can simply install a respective extension. With Mirasvit Google Tag Manager extension enabling this tracking service, it requires the copy-pasting of GTM code in script and noscript fields. Additionally, using the Magento Google Tag Manager plugin provides the full support of tracking tags provided by this service.

What is required in order to use the Google Tag Manager Magento plugin?

In order to perform a Magento Google Tag Manager Integration, you should obtain two accounts in the Google Analytics and Google Tag Manager services. Having created the GTM account, you will receive GTM regular code and no-script code, both of which should be pasted into the corresponding fields of the Google Tag Manager general configuration section.

What benefits does using custom dimensions bring?

A Magento 2 store may have lots of data, which is not supported by default with Google Analytics. Such non-standard information can be maneuvered into Google Analytics through custom dimensions and metrics. Custom dimensions are a part of this reports service, and you can feed them from your store. For example, with custom dimensions, it becomes possible to send to an analytic service such data as viewed item vendors, or hits of the user and their ID, etc.

How does Google Tag Manager affect online store productivity?

Gathering analytics on the events in your store is possible through direct injection of tracking code snippets into its source code. However, the execution of these injected tags can become a major reason for the site slowdown. Additionally, they may create code congestion, and make it much more difficult to support a Magento 2 store in the future

With the help of the Google Tag Manager Magento extension, a store owner can have no worries regarding a page loading slowdown due to event tracking. GTM offers server-side transaction tracking, and with this function, tracking code snippets are executed in the Google Cloud, having no impact on the store loading time. Additionally, server-side tracking guarantees every event will be transferred to an analytic service. With directly injected tracking tags, some events can be missed.

How is Google Tag Manager a key to advanced eCommerce reports?

Google Analytics service can provide significantly enhanced reports when getting data from Google Tag Manager. The letter allows tracking customer's in-store behavior in fine detail. By connecting GTM to Google Ananytics, a store owner gets such reports as:

  • Customer shopping behavior. This report displays every customer's step on their way to making a purchase. Using this report helps you identify steps in a customer's trail, where they quit without buying. With GTM, it is possible to monitor product views, add to shopping cart, checkouts, etc.
  • Behavior during checkout. Using this report, a store owner can see in details the customer actions on the checkout page.
  • Product statistics. For each product, a store owner can gather individual data on its performance. When Google Analytics gets data from GTM, it can receive information on price, quantity, revenue, user viewing, adding, or removing of products.
  • Sales. Google Analytics can show report on the sales in the store.

Which in-store events can Google Tag Manager send to Google Analytics?

The Google Tag Manager extension supports both Universal Analytics and Google Analytics 4. There, reporting services provides store owners with insights on the visitor's shopping behavior. They help to quantify the productivity of marketing efforts, product placements, etc. For building such in-depth reports, all main events in a store can be tracked:
  • Product Impressions
  • Product Clicks
  • Product Detail Impressions
  • Add/Remove from Cart
  • Add shopping data
  • Add payment data
  • Add product to wishlist
  • Promotion Impressions
  • Promotion Clicks
  • Checkout
  • Purchases
Viewing of the reports on this data can be done through several interfaces, which provide varying capabilities on monitoring. These interfaces are Web UI, Google Analytics 4 Data API, BigQuery Export.
Version 1.2.53Jun 1, 2023
Added ability to track refunds
Download tag settings files for websites
Version 1.2.52May 23, 2023
Encoding for the non alphabetical characters
Version 1.2.51Apr 20, 2023
Wrong GTM code load when the option "Move JS code to the bottom of the page" is enabled
Version 1.2.50Apr 14, 2023
Product Qty for the "view_item" event
Added store variables to Custom dimensions and metrics
Version 1.2.49Mar 23, 2023
JS error "TypeError: Cannot read properties of undefined"
Lifetime access to source code
Access to free support and updates for 1 year
Updates and support prolongation - $89
30 days money back guarantee
Compatible with:
Community: 2.3.* - 2.4.6
Enterprise: 2.3.* - 2.4.6
Reasons to choose Mirasvit
Client focusing and satisfaction

These are our primary. A major portion of our new clients come from referrals from our existing clients. Our professional team of developers, marketers and support staff have invested the best knowledge and experience in the field into our work, so you know you can come back to us again and again.

Remarkable support

One year free and high quality support. We go to great lengths to provide maximum satisfaction with every module you have purchased in our store. By helping you with installation, configuration, answering your every question, we do all our best to eliminate any possible problems.

Risk-free Investment

30-days money back guarantee. If you are not satisfied with our extension’s performance for any reason, we provide a full refund.

Constant improvements and upgrades

We constantly add new features to all our modules, and are always interested in hearing your opinion and implementing your suggested features in our future developments.

Comprehensive Documentation

We provide an expanded user guide for every aspect of our extension, so you can find answers for all your burning questions.

Unencrypted source code of our products

You can customize extensions according to your needs and requirements.

Usability and Performance

The Module is easy to install and upgrade, just follow our step-by-step user guide.

Safe Magento updates

No core modifications. Just use the composer or copy the extension’s files to the root directory of your store.