Introduction
This guide explains how to add Google Analytics to Magento so you can track and analyse visits to your site. This will allow you to improve SEO and increase conversions.
Requirements
- A Magento Admin account with access to the Sales Section.
- A Google Analytics Tracking ID for the site. If you don’t already have one, see How to set up a Google Analytics Account and Tracking ID.
Skill Level
Basic knowledge of Magento.
Instructions
Time needed: 5 minutes.
- Log into Magento Admin.
- Go to the Configuration page.
In the main menu click Stores > Settings > Configuration.
- Go to the Google API page.
In the sub-menu click Sales > Google API.
- Enable Google Analytics.
If you manage more than one Store View (publicly available site) in Magento Admin, select the relevant Website or Store View in the Scope drop down.
Click the Google Analytics section.
In the Enable drop down select Yes.
In the Account Number field enter the Google Analytics ID. This starts with UA-…
In the Anonymize IP drop down, select the relevant option which matches your privacy policy. If in doubt, select Yes.
In the Enable Content Experiments drop down select No unless you’ve got an existing Google Content Experiment running.
Click Save Config.
More Info
Magento guide to Google Analytics: https://docs.magento.com/user-guide/marketing/google-universal-analytics.html