How to Integrate Google Analytics in Magento 2

The Most Popular Extension Builder for Magento 2

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

According to W3Techs, Google Analytics is used by 52.9 percent of all websites on the internet, more than 10 times the next most popular analytics option, Yandex Metrics.

Why can Google Analytics take 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 recommended 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 essential analytical tools for search engine optimization (SEO) and marketing purposes. It allows you to measure the results of individual campaigns in real-time, track data, compare the data to previous periods, and much more. The service is available to anyone with a Google account.

Google Analytics

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

  • Data visualization tools, including an admin panel, 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: Google AdWords, Public Data Explorer, and Website Optimizer.

How to Add Google Analytics to Magento 2?

Register Google Analytics Account

Visit the following link to create 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 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 the Google Analytics extension by Mageplaza on your Magento store. You can download the module here and then install it on your website.

After registering the account on the 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 various forms (pie chart, column chart, bar chart, line graph, table, etc.). By showing behavioral data, they can help you promote data based business decisions. They are:

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

Checkout Behavior Analysis Report

  • Shopping Behavior: Show the 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 that cover date, time, transaction ID.

Sales Performance

  • Product Performance: Store owners can view product performance in 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 the cart, and checkout completion.

Product Performance

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

Product List Performance

Product Views and Clicks Are Recored with Details

Google Analytics allows Magento 2 stores to track and record events occurring on 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 (Google Analytics ID, name, category, quantity, price and more) are sent successfully.

Visualize Cart Updating and Checkout Events

All the information related to cart updating, such as product ID, product name, product brand, category, quantity, and price will be sent to Google Analytics. Then, Analysis Process will give back detailed 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 the shopping cart page will also be transferred to GA. Similarly, the Next Steps of Checkout process such as adding coupon and filling in the address information, will also be captured and delivered to GA.

begin checkout

next checkout

Order Success Events

Integrating the Google Analytics in-store site helps store owners easily send the purchase event with store products to Google Analytics. 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 billion 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 valuable insights into them. Consequently, your advertising and marketing strategies are more targeted to potential customers at a suitable market.

Google Analytics

Google Analytics PRO for Magento 2

A clear insight into shopping and behavior of customers with 5 advanced reports

Check it out!

Full features of Google Analytics Extension

For Store Admins

General Configuration

  • Enable/ Disable the module

M2 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, Google Analytics code
  • Allow adding extra tracking IDs, GG tracking code, tracking data
  • Link Attribution which helps improve click reports by differentiating between multiple link clicks that have the same website URL automatically
  • Allow Linker to view sessions from two related sites
  • Enable Google Analytics advertising features (including Remarketing Lists for Search Ads)
  • Collect statistics on your ecommerce store
  • 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

We hope this post has offered you everything about integrating Google Analytics to your Magento 2 store.

Especially, the Google Analytics extension from Mageplaza helps you get enhanced ecommerce data from your store and send it to Google Analytics more quickly and conveniently. With the support of the Google Analytics rebuild add-on, you can have a precise analysis of the insight into shopping and behavior of customers and properly make the right business strategies. Everything is ready within a few clicks!


Related Posts:

Website Support
& Maintenance Services

Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

Get Started
mageplaza services

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