Here are all steps for you to know How to Enable Google Analytics in Magento 2 :
- Step 1: Create Google Analytics Account
- Step 2: Obtain a tracking ID
- Step 3: Configure the Google API in Magento 2
Step 1: Create Google Analytics Account
Go to this link to create an account: https://www.google.com/analytics/
Select Sign in with Google Analytics option and click Sign up.
Step 2: Obtain a tracking ID
After fill all information please scroll to bottom and click Get Tracking ID button
Then accept Google Analytics Terms of Service
Step 3: Configure the Google API in Magento 2
Login to you magento 2 admin and go to Stores>Configuration.
Choose Sales>Google API section
Fill your google tracking ID, enable then click Save Config button
Note: Please wait some minutes for google check and load your data then you can track the activity on your website.