Adding Google Analytics Tracking in Magento 2

Adding Google Analytics Tracking in Magento 2

Liam Firth

If you want to run a successful online store, it is vital to monitor and track what traffic is coming to your store. Monitoring and responding to this traffic can then help you increase your sales! Those who are not familiar with Google analytics tracking are putting themselves at a real disadvantage and making it more difficult for themselves to increase sales.

Tracking and monitoring traffic to your site is actually quite easy. You can also monitor the conversion rates with just a few simple clicks! Furthermore, you can determine the performance of your site, plus each page’s engagement. This can prove useful in improving your site’s search engine optimisation.

All of this is possible by adding Google analytics to your webstore! Find out how you can do this below.

Step 1: Create a Google Analytics Account

The first thing you will need to do is visit Google analytics while logged into your Gmail account. You will then be asked to fill out a few simple details such as the website name and URL. Once you have done this, hit ‘Get Tracking ID.’ Then make sure to read the Terms and Conditions of Google Analytics and hit ‘I Accept.’

The last thing you will need to do before configuring Google Analytics in Magento 2 is to copy the Tracking ID. After you have accepted the Terms and Condition, this Tracking ID should appear on your screen.

Step 2: Configuring Google Analytics in Magento 2

Setting up Google analytics in Magento 2 is incredibly easy and you can do it in just a few simple steps. So, don’t be intimidated by it! Before long, you will be reaping the rewards that come with tracking your store traffic.

The first thing users must do is head on over to ‘Stores’ in Magento 2. Under this, you will find ‘Configuration.’ Next, hit ‘Google API.’ This can be located under the ‘SALES.’ You can then head on over to the Google Analytics sector and fill in the Tracking ID number. This should be entered in the Account Number field. Once you have done this, hit the ‘Save Config,’ button.

Step 3: Check the Results

Once you have done all that, it is time to double check that your efforts have paid off! Open your store from the frontend and then head on over to your newly set up Google analytics account. Click on the ‘Overview’ button, which you can find under the ‘Real Time’ tab on the left-hand side. You will then get to see your results! Here, you can see how many active users you have on the site, page views, top active pages, top referrals, top locations and top social traffic amongst much, much more!

Have you already configured Google analytics in your Magento 2 store? Let us know and whether this information has helped you to increase your sales.

Liam Firth

Author Liam Firth

Liam is a Technical Lead with eight-years’ experience in Magento and WordPress development, as well as engineering AWS and DevOps. He likes sourcing new and shiny tech solutions for real-world problems. He is a Magento Professional Certified Developer.

More posts by Liam Firth