Get Free Audit

How to Add Google Analytics Code in Magento 2.0

Feb 15, 2016

1220 Andrey Litvin

How to Add Google Analytics Code in Magento 2.0

In order to track the results of your store in Google analytics, you need to generate the code following Google instructions.

After you follow the steps from their tutorial, you will get a code that looks like the following:

Igor Dragun
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Igor


UA-AAAAA-A is a unique code that was given to your store by Google.

After you generated the code (UA-AAAAA-A), you need to add it on your website. In order to do so, follow a few simple steps.

Log in to your admin panel and navigate directly to Stores => Configuration

Then under Sales, find Google API.

How to Add Google Analytics Code in Magento 2.0

Now click to expand Googla Analytics section, select “Yes” to enable and enter the code (UA-AAAAA-A). Don’t forget to press “Save Config”.

How to add google analytics code in Magento 2.0

Magento 2 Development

Take your online store to the next level with BelVG Magento 2 Development

Visit the page
Igor Dragun
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Igor

8 Comments

  1. Hi, Afroz! Thanks for your question.
    The question you asked and many others concerning Google Analytics was addressed in detail in a recent article at our blog How to Set up Magento Google Analytics? Step-by-step Instruction.

  2. Thanks you have explain this process nicely, and here’s a much simpler and easy to follow tutorial to add Google Analytics on Magento 2 on magenticians I found it very useful too.

  3. Hi tezka,
    after adding Tracking ID, what about:
    “This is the Universal Analytics tracking code for this property.
    To get all the benefits of Universal Analytics for this property, copy and paste this code into every webpage you want to track.”
    Do I need it on every page also, or Tracking ID is enough?
    Regards,
    Andrew

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *