Set Up Magento 2 Google Analytics in 5 Effortless Steps

by Summer

For Magento stores, a successful content strategy that attracts potential customers to your website and drives sales is made from an exact website analysis. When saying about this task (website analysis), Google Analytics is a tool nobody should ignore by its great support. 

Right in this post, BSS Commerce shares with you 5 easy steps to set up Magento 2 Google Analytics for useful reports about your Magento website. 

The Benefits of Magento Google Analytics

What is Google Analytics 4? Google Analytics (GA) is a free tool powered by Google and the most popular digital analytics software. This incredible Magento analytics tool allows you to analyze and track all details about visitors’ behavior and even what goes on your website in real-time. 

To know how your content works 

To inspect the effectiveness of content on your website via Google Analytics, from the dashboard, navigate Behavior > Site Content > All Pages. 

Then, you will see 6 indicators that let you know audiences’ behaviors on a specific URL, including Pageviews, Unique Pageviews, Average Time on Page, Entrances, Bounce Rate, % Exit, and Page Value. 

Set Up Magento 2 Google Analytics

To know the sales and conversions 

From the dashboard, choose Conversions > Goals > Goal Flow.

Through Google Analytics report, you will know which sources drive your conversions and sales (Google, email, or referral) in a detailed buyer journey (from beginning to the successful checkout). 

Set Up Magento 2 Google Analytics

To keep track your campaigns 

Another support of Google Analytics is exploring the effectiveness of campaigns via Acquisition > Google Ads > Campaigns

Set Up Magento 2 Google Analytics

5 Steps to Set Up Magento 2 Google Analytics in Your Store

Step 1: Sign up a Google Analytics account 

The very first step is obviously to create your Google Analytics account (If you have already signed up, just skip this step). You need to login to your Google account for or create a new one if you haven’t had yet. 

Now, go to Google Analytics to create your account at

After you choose “Create Account,” create an account name and select what you want to measure (Web, Apps), the screen will display this form: 


Enter your website name and its URL, then complete other information. Click “Get Tracking ID” once you finish the form. In this way, you’ve already done this step. 

Step 2: Get a tracking code 

To set up Magento 2 Google Analytics, you have to add a Google Analytics code to your Magento 2. To get the code, let’s navigate the left side of the Analytics dashboard and choose the Admin Tab

In the Admin Tab, select Tracking Infor and open Tracking Code. The screen will display the Tracking ID that you need. 


Step 3: Enable Google Analytics API in Magento 

After getting the code from Google Analytics, you must go to your Magento backend, navigate Store => Configuration => Sales. Under the Sales panel, open Google API

When Magento Google Analytics is opened, follow these steps: 

  • Set Enable as Yes 
  • Copy the Google Analytics tracking code and paste it in Account Number
  • Set Enable Content Experiments as Yes  
  • Finally, choose Save Config

Set Up Magento 2 Google Analytics

Step 4: Set Enhanced Ecommerce Tracking 

You cannot miss this step when setting up Google Analytics. Let’s turn back to Google Analytics, find Ecommerce Settings on the left panel and click on it. 

After that, switch Ecommerce set-up and Enable Enhanced Ecommerce Reporting to “On.”

To finish this step, don’t forget to save changes. 


Step 5: Check to ensure everything works correctly 

Last but not least to set up Magento 2 Google Analytics, you should check all the things if they work correctly. 

It’s super easy. Just open your website in the frontend, then see how Magento Google Analytics shows you in the Realt-time report at Overview. You can check Overview, Location, or Traffic Sources to make sure everything goes right if your access is tracked correctly. 

>>> Read important article: Top 5 Best Magento 2 Google Analytics 4 Extensions To Track Data

Wrapping Up

By completing the above 5 steps to set up Magento 2 Google Analytics without difficulty, you have a powerful Magento analytics tool to support your eCommerce business from now on. Your job is to use the reports in a clever way for proper content strategy in the long run.

To boost traffic more effectively, you also can improve SEO for your Magento store. 

Next Reading Suggestions

© 2019 BSS Commerce owned by THANH CONG INTER ., JSC. All Rights Reserved.
Business registration certificate no. 0106064469 issued by Hanoi Department of Planning and Investment on 19 December 2019.
Legal Representative: Mr. Nguyen Quang Trung.