Add google analytics code in magento2

To add google analytics code in Magento2
Log in to Magento Backend

  1. On the Admin sidebar, go to Stores > Settings > Configuration.
  2. In the left panel, expand Sales and choose Google API.
  3. Expand Expansion selector the Google Analytics section and do the following:
    • Set Enable to Yes.
    • Enter your Google Analytics Account Number.
    • If you want to conduct A/B testing and other performance tests on your content, set Content Experiments to Yes.
  4. When complete, click Save Config.
https://docs.magento.com/user-guide/marketing/google-universal-analytics.html

Leave a comment

Your email address will not be published. Required fields are marked *