Adding Google Analytics to your Magento store is relatively simple and requires no coding. This is how you can add Google Analytics to Magento:
- Log in to Google Analytics and create a new analytics account for your Magento store.
- Log in to Magento admin and navigate to System -> Configuration -> Sales -> Google API
- Copy the new analytics account ID from analytics to Magento’ Google API settings field Account Number
- Pick Yes from the dropdown.
- Save configuration and check Google Analytics if it says “tracking code installed”.