This page will explain how to create account on Google Analytics and integrate with the site.
If you do not have a google account (gmail account), create one. If you have it, proceed with the following steps:
- Go to Google Analytics page. If it is the first time, it will show you a button Setup for free. Press the button.
- The Account Creation is a three steps form.
- In the 'account setup', enter the account name, your website name. Then press Next.
- In the 'What do you want to measure' chose web and press next.
- In the 'Property setup'
- Website Name: your website name
- Website URL: select
https://
and enter your page url. - Fill in the rest accordingly, and press Create
- Check the 'I accept ...' and press I Accept button.
- Copy the Tracking ID, the word that starts with
UA-
, that's the value that you will enter for GOOGLE_TAG_ID variable in your CI/CD.
- In GitLab, go to menu Settings --> CI/CD
- Click the button Expand on the Variable section.
- Press the Add Variable Button.
- Enter the in
Key
enterGOOGLE_TAG_ID
and inValue
enter theUI-XXXX
value you copied from the Google Analytics page. - Redeploy by going to CI/CD menu and click on the las successful deploy and press the Retry icon.