How to Integrate Google Analytics in Magento 2

Rainy avatar
Rainy Updated: May 01, 2022


The Most Popular Extension Builder for Magento 2

With a big catalog of 234+ extensions for your online store

According to W3Techs, Google Analytics is being used by 52.9 percent of all websites on the internet, more than 10 times the next most popular analytics option, Yandex Metrics. Why Google Analytics takes this high user number from website owners over the world. In this post, we will typically give out the most important reasons for that question. Also, we will guide you on how to integrate the highly recommend Google Analytics extension for any Magento 2 store.

Main Contents

What is Google Analytics?

Google Analytics is a Web analytics service that provides statistics and basic analytical tools for search engine optimization (SEO) and marketing purposes. It allows you to measure the results of individual campaigns in real-time, compare the data to previous periods, and so much more. The service is available to anyone with a Google account.

Google Analytics

Here are some key features that Google Analytics support e-commerce runners:

  • Data visualization tools including a dashboard, scorecards and motion charts, which display changes in data over time.

  • Segmentation for analysis of subsets such as conversions.

  • Custom reports.

  • Email-based sharing and communication.

  • Integration with other Google products which are Google AdWords, Public Data Explorer, and Website Optimizer.

How to Integrate Google Analytics in Magento 2?

Register Google Analytics Account:

Visit the following link to register a Google Analytics account

Register Google Analytics Account

Firstly, choose Sign up to use the Google Analytics tool to register an account.

Sign up

  • Choose the object that you want to track; you can choose either Website or Mobile Apps. The next step is completing your account information in the New Account registration form.
  • After that, please click “Get Tracking ID”.
  • Another dialog will be displayed:

    Another dialog

  • Then click on the I accept button to agree to the terms of service.
  • You will see the following interface if the registration is successful, and you also have GA Tracking ID in order to install in Magento.

GA Tracking ID

How to configure Google Analytics Extension

In this post, we would love to guide you on how to configure Mageplaza Google Analytics extension on your Magento store. You can download the module here and then install it on your website. After having the account registered on Google Analytics page, please visit this link to learn more about the configuration steps to have Google Analytics running on your system.

Outstanding Functions supported in Google Analytics Extension

Provide 5 Insight E-commerce Reports

Google Analytics allows e-stores to have 5 valuable reports which are presented in the various forms (pie chart, column chart, bar chart, line graph, table, etc). They are:

  • Checkout Behavior: Report on customer spending time on each checkout steps, transactions and abandonment rate.

Checkout Behavior

  • Shopping Behavior: Show number of sessions at each buying stage including product view, add to cart and checkout.

Shopping Behavior

  • Sales Performance: Sales can be evaluated by one of two dimensions in Transactions in which cover date, time, transaction ID.

Sales Performance

  • Product Performance: Store owners can view product performance in the term of their sales statistics such as revenue, price, and quantity. Besides, they can take a closer look at user engagement with their products. Some activities can be mentioned here are viewing product times, adding/ removing products to cart and checkout completion.

Product Performance

  • Product List Performance: There are three dimensions provided Product List Views, Product List Click and Product List CTR.

Product List Performance

Product views and clicks are recorded with details

Google Analytics allows Magento 2 stores to track and record events occurring at Product Details Page and Category Page as well. There are two typical tracking user engagement values. The first one is Product Impressions which measure the views of products on the Category Page and the Product Page. The other one is Product Clicks which reports the click numbers on products or product links for one or more products on the Category Page.

Category Page

Product Page

Customer Click

Google Analytics account will receive these analysis data after events as view_item, view_item_list and select_content with product information (ID, name, category, quantity, price and more) are sent to successfully.

Visualize Cart Updating and Checkout Events

All the information related to cart updating such as product ID, product name, product brand, category, quantity, the price will be sent to Google Analytics and the Analysis Process will give back the details reports on the Cart behaviors later.

add to cart

removing from cart

Regarding the Checkout Process, a Begin Checkout Event in which customers click to redirect to shopping cart page will also be transferred to GA. Similarly, Next Steps of Checkout process such as adding coupon and filling in the address information also be captured and delivered to GA.

begin checkout

next checkout

Order success events

Integrating Google Analytics in store site helps store owners to send the purchase event with store products to Google Analytics with ease. At the time a customer places an order successfully, a purchase event with the below information will be tracked:

  • Transaction ID
  • Store Affiliation
  • Revenue
  • Shipping tax
  • Product Data (product ID, name, SKU, category, price, quantity)

Order success events

Facebook Pixel Integration

Facebook Pixel

Facebook nowadays become the most popular social network in the world with a hundred billions of users. Thus, advertising on Facebook seems a worthy investment for Magento 2 website owners. With this Google Analytics tool integrated with Facebook Pixel - a specific analytics tool for Facebook users, you can have a deep insight into them. Consequently, your advertising and marketing strategies are more targeted to potential customers at a suitable market.

Full features of Google Analytics Extension

For Store Admins

General Configuration

  • Enable/ Disable the module

Google Tag Manager

  • Turn on/ off Google Tag Manager
  • Allow adding Google Tag ID

Google Analytics E-commerce

  • Turn on/ off Google Analytics E-commerce
  • Allow inputting Google Analytics Tracking ID
  • Allow adding extra tracking IDs
  • Link Attribution which helps improve click reports by differentiating between multiple link clicks that have the same URL automatically
  • Allow Linker to view sessions from two related sites
  • Allow using Google Analytics advertising features (including Remarketing Lists for Search Ads)
  • Offer IP Anonymization

Facebook Pixel

  • Turn on/ off Facebook Pixel
  • Allow inputting Facebook Pixel ID

Google Adwords Conversion Tracking

  • Allow setting up Google Adwords Conversion Tracking

For Customers

  • The store visitors’ demands are fulfilled better
  • Have a superior shopping experience

Final Words

In this post, hopefully, users can find how importance Google Analytics is with your Magento 2 websites. Especially, Google Analytics extension from Mageplaza helps store owners get enhanced ecommerce data from the stores, and send it to Google Analytics more easily and conveniently. With the support of Google Analytics rebuild add-on, store owners can have a clear analysis of the insight into shopping and behavior of customers and make the right business strategies properly.

See more Google Analytics

Increase sales,
not your workload

Simple, powerful tools to grow your business. Easy to use, quick to master and all at an affordable price.

Get Started
avada marketing automation

Stay in the know

Get special offers on the latest news from Mageplaza.

Earn $10 in reward now!

Earn $10 in reward now!

go up