Magento 2 Google Analytics 4 with GTM

View Demo

Get in-depth reports on your customers' behavior while they are shopping using our Google Analytics 4 with GTM extension.

Utilize this module to integrate eCommerce Tracking with Google Analytics 4 and identify bottlenecks in the shopping process within your store.

  • Track the in-store behavior of your customers and observe their shopping journey step by step with Ecommerce Tracking in Google Analytics.
  • Integrate tracking tags with custom blocks on the store pages using markup markers.
  • Enhanced Google Analytics 4 (GA4) tracking support.
  • Gather non-standard information by adding custom dimensions and metrics.
Compatible with:
Community:
2.3.* - 2.4.6
Enterprise:
2.3.* - 2.4.6
Magento Cloud
Hyvä
Problem

Ecommerce Tracking in Google Analytics allows you to get in-depth reports on user actions in the store. These profound reports improve your revenue. However, adding this tracking directly to the Magento 2 store code can be a complex task.

Solution

Using our Google Analytics 4 module, Ecommerce Tracking can be activated without requiring deep coding knowledge. With this solution, you can embed the GTM tracking snippet into your Magento 2 store simply by pasting it into the store's admin panel.

What benefits does Google Analytics for Magento 2 bring to your store?

Google Analytics provides deep insights into customer interactions with your Magento 2 store. This data is collected by the Google Tag Manager code snippet embedded in the store's frontend.

By analyzing data on in-store user behavior, you can identify bottlenecks in the shopping process and gain insights to optimize your marketing strategies, content, and user experience.

Get in-depth customer tracking

Track the entire lifecycle of user actions in your store with Google Analytics for Magento 2, from the moment a visitor lands on your website to the point of purchase.

Use this in-depth tracking to identify bottlenecks in the shopping process and make adjustments to improve the customer experience.

Use your marketing budget more effectively

Use the reports in Google Analytics for Magento 2 to get insights on increasing the effectiveness of your marketing campaigns.

Highlight why shoppers abandon their carts

Utilize the Google Analytics Enhanced Ecommerce Magento reports to pinpoint the stage at which customers abandon their carts.

Get insights for implementing targeted measures to reduce abandonment rates, thereby increasing your overall sales.

Obtain actionable insights

Make informed decisions, tailor your marketing efforts, enhance user experience, and ultimately boost your store's revenue with the reports built by Google Analytics based on data collected in your store.

Main features of Magento GA4 and Google Tag Manager extension

No manual code editing needed to connect GA4

Mirasvit's GA4 Magento 2 extension connects your store to GA4 without requiring manual editing of your store's Magento code. It offers a user-friendly interface for embedding the GTM tracking snippet, ensuring accurate and comprehensive data in GA4.

Apply custom tracking dimensions and metrics

The Magento Google Tag Manager Enhanced Ecommerce extension is capable of collecting almost any data on users in your store. Configure custom dimensions and metrics to gain a deeper understanding of website traffic and user behavior.

Integration with custom blocks in the store's frontend

Track how users interact with custom blocks on your frontend.

Our Magento 2 analytics module can send data to GA4, such as view_item_list, view_item, and select_item, when users interact with your custom blocks.

Support for extended reports in Google Analytics 4

Gain insights into the entire purchase process, from product views and cart additions to checkout steps and payment methods. This data is analyzed with Extended reports in GA4.

Measure how often products are viewed by users

Use our Google Analytics 4 with GTM extension to collect data on products viewed by visitors and deliver it to the respective GA4 report. This is helpful for understanding customer behavior on a profound level.

Monitor events for customer groups and product variants

Collect events specific to customer groups in your store and build reports based on this data to provide personalized recommendations to customers within a specific customer group.

Additionally, track user-generated events specific to product variants.

Improve customers' shopping journey to increase orders

Track customer actions in your store and gather valuable data that can highlight shopping experience bottlenecks.

Receive hints on how to increase your sales by knowing which products customers are viewing and when they add or remove items from the shopping cart.

Utilize the data collected for Ecommerce Tracking in Google Analytics to understand how your marketing strategies can be optimized.

Google Tag Manager

Google Analytics 4 (GA4) support

Get a first-class integration between your Magento 2 store and Google Analytics 4 suite. Furthermore, the extension supports Google Ads remarketing.

New In addition to tracking online events on the frontend, the extension offers the functionality of offline refund tracking through cron jobs. This means that whether a credit memo is created automatically or via the backend, the extension will send the refund event to Google Analytics 4.

home analytics

The Magento 2 Google Tag Manager Enhanced Ecommerce extension supports the full list of Google Analytics 4 tracking 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 from Magento 2 Google Analytics 4

Gain deeper insights into your customers' behavior by collecting non-standard data through custom dimensions and metrics. For example, the Google Tag Manager plugin can send special price, customer group, tax class, dynamic weight, and other attributes to your Google Analytics reports.

google analytics custom dimensions

Track custom blocks in Google Analytics

Understand the effectiveness of custom product blocks on your store's frontend. Collect data such as view_item_list, view_item, and select_item for custom block tracking in Google Analytics. Build reports based on this data to get hints on how your custom blocks can generate more sales.

google tag manager ecommerce magento

No coding is required for enhanced ecommerce with Google Tag Manager Magento 2

With the Google Tag Manager Magento plugin, you will not be required to edit the source code of your store to add the code snippet for event data collection. You will simply need to copy and paste it into the designated field.

google tag manager ecommerce magento

Built-in Debug Toolbar

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

Utilize the built-in Debug toolbar provided by our Google Tag Manager extension to view the collected data for each monitored event.

google tag manager ecommerce magento
Lifetime access to source code
Access to free support and updates for 1 year
Updates and support prolongation - $90

Pay today $149 for the first year.

Then $90 for updates and support services per year.

Cancel anytime.

30 days money back guarantee
See it in action!
Pick a quick tutorial to learn about various aspects of this extension
Customer Reviews 23
Earn points for your review about this extension modules. $1 = 10 points
Write Your Own Review

check-circle You submitted your review for moderation.

Jerry Verified Buyer
From Walnut, United States
Using the module for almost 1 year
Very useful and easy to work with
Highly recommend this extension due to its ease of use and usability. The setup process makes configuring GTM effortless and tracking seems to work quite well.
Also installed:
Advanced Reports,  Event Watcher & Notification,  Sphinx Search Ultimate,  Full Page Cache Warmer,  Automatic Related Products,  Health & Performance Monitoring Suite,  Follow Up Email and 16 more
Pieter Verified Buyer
From Belgium
Using the module for almost 1 year
Easy install to benefit of the full benefits of Google Analytics
Easy install of this extension. Also easy to use and configure. Frequent software updates.
Also installed:
Advanced SEO Suite,  Elastic Search Ultimate,  GDPR
Robert Verified Buyer
From United States
Using the module for over 1 month
Enhanced our Google Tracking and Analytics
Simplified the slow process of managing and deploying tracking tags and analytics scripts across our website.
Also installed:
Advanced Product Feeds,  Full Page Cache Warmer,  Order Management,  RMA,  Elastic Search Ultimate,  AI Assistant,  Automatic Related Products and 8 more
Guus Verified Buyer
From Rosmalen, Netherlands
Using the module for 7 months
Works as expected
Just had to install the extension, create the tags and we had everything running.
Also installed:
Reward Points,  Mass Product Actions,  Advanced SEO Suite,  Advanced Product Feeds,  Extended Shopping Cart Rules
Howard Verified Buyer
From Johannesburg, South Africa
Using the module for over 1 month
Good Value!
The Mirasvit Tag Manager extension pushes data into the data layer, which is a critical feature for tracking sales data.
Normal Tag Manager extensions won't do this, making this useless for this purpose.
It's fully compatible with GA4, Pixel, and Google Ads.
It also has a feature to track refunds
Also installed:
Reward Points,  RMA,  Affiliate,  Advanced SEO Suite,  Advanced Product Feeds,  Advanced Reports
Manual & Support
Need more help?

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

Frequently asked questions
chevron-down chevron-right

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.

chevron-down chevron-right

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

With GA4 module, 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 Analytics extension, 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 Analytics module.

In order to get a GA4 integration 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 Analytics extension enabling this tracking service, it requires the copy-pasting of GTM code in script and noscript fields. Additionally, using the Magento GA4 plugin provides the full support of tracking tags provided by this service.

chevron-down chevron-right

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

In order to perform a Magento Google Analytics 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.

chevron-down chevron-right

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.

chevron-down chevron-right

How does GA4 tracking 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 Analytics Magento extension, a store owner can have no worries regarding a page loading slowdown due to event tracking. GA4 extension 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.

chevron-down chevron-right

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.
chevron-down chevron-right

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

The GA4 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.
Changelog
Version 2.0.8Mar 28, 2024
Unicode was removed from the items.item_brand
Added user data variables to the Purchase event(enhanced_conversion_data)
Version 2.0.7Mar 19, 2024
Custom product attributes return questionmarks for some locales
User properties pushed to ga via dataLayer for add_to_cart, shipping and payment events
Track preselected product variant
Track user email for the Guest conversions
Version 2.0.6Mar 1, 2024
Google Consent v2 compatibility
Version 2.0.4Dec 27, 2023
Ability to track refunds per storeview
Version 2.0.3Nov 28, 2023
Tracking coupon name in the "add_shipping_info" event
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 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 extension 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. Additionally, the extension is ready to use with the Hyvä theme.

Ready for Magento Cloud

No core modifications. The extension has been tested in a Magento Cloud environment and is fully compatible with it.

Loading...