Set up Google Analytics eCommerce tracking in Magento 2

Set up Google Analytics eCommerce tracking in Magento 2

Hello E-commerce Folks?,

How are you all performing? In today’s article, I am going to explain How to Set up Google Analytics eCommerce tracking in Magento 2. In the last article I have discussed Two Factor Authentication for Magento 2 -Everything You Need to Know. Let’s begin with setting up Google Analytics eCommerce tracking?

Preface:

Do you have a website? Do you have an E-commerce website? Google offers a tracking service for monitoring all the traffic on your website. It has enhanced features of tracking the conversion ratio and measures your website’s traffic. Google Analytics is a very helpful tool for all websites, especially E-commerce websites. It helps in the E-commerce merchants to supervise their Magento stores. Magento provides a built-in Google Analytics tracking option that helps the Magento merchants to emphasize their websites in terms of optimizing in targeted fields. As we all know that in these trending technologies everything is trackable.

Basically, many of the E-commerce store owners are unaware of the feasible features of the Google Analytics tracking service. Including the website, traffic insights google analytics provides featured views of visualizations & demographics, goal setup and tracking, visitors segmentation. This all advanced features helps in monitoring your Magento E-commerce tracking.

I have got many queries in my inbox from the Magento Merchants related to issues in fixing Google Analytics in their Magento E-commerce website. Many times configuring the Google Analytics in your Magento websites might be a complex task for you especially when some issues are encountered.

Steps to Set up Google Analytics eCommerce tracking in Magento 2:

Step 1: Get Google Analytics Tracking ID

Note: In case if you don’t have a Google Analytics account create a new one free from here.

-For getting the Google Analytics Tracking ID you will have to login in your google analytics account and navigate to Admin settings right from the bottom of the left bar in your google analytics account

Set up Google Analytics eCommerce tracking

– After that tap on Create Account

Create GA Account

– Fill out the appropriate details given below.

Fill out details

Read carefully the terms and conditions and accept them. After that, you will get the tracking code.

tracking-code

Step 2: Configure Google Analytics in Magento 2:

– Navigate to Stores>Configuration>Google API

Google Analytics in Magento 2

– Now, after this enable the Google API field and paste the Google Analytics code in the Account Number section and click on Save Config for implementing the changes.

Google API in Magento 2

Step 3: Set up Magento Ecommerce Tracking

  • Google Analytics provides advanced tracking reports for E-commerce websites. All the activities are monitored with this feature including the purchase activities, transaction details, conversion rates, and much more in your Magento 2 store. For settings that navigates to the Admin section of your google analytics account and clicks on E-commerce settings.

Set up Magento Ecommerce Tracking

  • After this just turn on the E-commerce and enhanced E-commerce reporting option and tap to Save Button.

E-commerce reporting option

  • Now just check that you have successfully set up the Magento 2 Google Analytics perfectly. Get started with your Magento 2 store and wait for some time to reflect traffic data in your Google Analytics property.

your Google Analytics property

That’s It. As you can review the above Screenshot you have successfully configured Magento 2 Google Analytics for your E-commerce store.

If you wish to implement Universal Analytics Enhanced Ecommerce for deep insights of product views and sales promotions tracking then check our addon guideline below,

Universal Analytics Enhanced Ecommerce:

Mainly, with the help of Google Analytics Enhanced Ecommerce, you can send your promotion, sales and product impression details via Google Analytics pageviews and events. With the help of page views, you can track the promotion, sales and product impression. And also the checkout steps and product clicks via events.

Enabling Enhanced Ecommerce

Mostly, when you apply this you need to make sure to enable the Enhanced Ecommerce on each and every event tag of the Universal Analytics pageview. It consists of mainly 2 methods 

Implement with the help of Data Layer (Recommended by Google)

Using the Data Layer

Check the below-given sections for measuring the enhanced ecommerce activities with the help of Data Layer:

Implement with the help of Custom JavaScript Macro

Check the below-given sections for measuring the enhanced ecommerce activities with the help of Custom JavaScript Macro

Over to You.

Therefore, implement the above steps to configure Google Analytics in your Magento 2 store. In case you face any issues then make sure you upgrade your Magento 2 store and then try it. And still facing problems then describe it in the comment box. I will solve it there. If you are kind of a non-developer then no worries use Magento Upgrade Service for upgrading your Magento 2 store. Help your friends in fixing Google Analytics in their Magento 2 store by sharing this article with them. Till then Stay Happy and Stay Safe.

Happy Tracking?

Previous Article

How to Set Cart Page Items Custom Notice Message in Magento 2

Next Article

Magento 2: How to Get Most Viewed Product Collection

Write a Comment
  1. Hey, nice article! I have a question. We implemented everything as above. Normal analytics are taken, but no ecommerce. I read, that only the payed version of Magento 2 allows ecommerce-tracking. Is that correct?

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨