Magento 2 Google Analytics Settings

What is a Magento Integration?
Magento is most widely used open source shopping cart technology with lot of out of the box features. Magento API will allow you to integrate or connect with any third-party services for the business automation like: your order management or shipping, accounting, digital campaigns/ advertisement tracking etc. In this blog, we are integrating Google Analytics API to Magento store.

What is Google Analytics and Why we need to integrate with Magento?
Google Analytics is a web analytics service offered by Google to track website traffic, it provides insights about how the people are interacting with your store, what pages are ranked high, conversion rates etc.

In two simple steps we can integrate Google analytics in Magento 2.

Step: 1:-  Google Analytics Tracking Code Generation:
Go to
If you have already Google analytics account, login with your existing account, otherwise sign up for new account.

GA Signup Integration with Magento

2. Fill the required fields like – Account name, Website name, Website URL, select the category and then click on get Tracking Id and agree to the Google Analytics terms of service agreement.

GA I accept Terms

3: Get the tracking Id by going to tracking information page as shown in the blow screen shot.

Google Analytics Code

Step : 2 Configure the Google API in Magento 2:
Login to your admin area and navigate to Stores -> Configuration->  Sales -> Google API


Enter your Google analytics Account Number UA-XXXXXXXX-1 and click on Save Config.