This article discusses how to use Google Analytics with your Magento site to obtain statistics about visitor traffic.
Google Analytics provides detailed statistics about visitor traffic to your site. To use Google Analytics with Magento (or with any other type of site), you must first sign up for a Google Analytics account at http://www.google.com/analytics and obtain a unique Tracking ID.
After you have set up a Google Analytics account and have the Tracking ID for your site, you can configure it for Magento. Unlike many other CMS and e-commerce applications, you do not have to install a separate plugin or module to use Google Analytics. Magento includes Google Analytics support by default.
Follow the appropriate procedure below for your version of Magento.
To enable Google Analytics for Magento 2, follow these steps:
To enable Google Analytics for Magento 1.9 and older versions, follow these steps:
In the Enable IP anonymization list box, select one of the following:
For more information about Google Analytics, please visit http://www.google.com/analytics.