Here you will find the instructions on how to integrate the Google Analytics into your Magento 2 store.
Get a tracking ID
1. First of all, you need to open the following page: Google Analytics and fill in all the requested data to obtain a tracking ID.
2. After, accept Google Analytics’ Terms of Service.
3. You will be redirected to the page, where you will see all the information including the tracking ID.
4. It has the following structure UA-XXXXXXXXX-Y.
Login to Magento Admin Panel
5. Copy your tracking ID and go to your Magento Admin Panel.
6. Navigate to the Stores > Configuration section.
7. Then go to the Sales > Google API section.
8. Expand the Google Analytics tab and set Enable option to “Yes”.
9. Paste your ID to the Account Number text field.
10. You should save configurations and clear Magento cache to apply the edits.