- Create a google analytics account and login
- Click Admin
- Select your account from the menu in the ACCOUNT column.
- Select desired property from the menu in the PROPERTY column.
- Under PROPERTY; click Tracking Info > Tracking Code
<!– Global Site Tag (gtag.js) – Google Analytics –>
… (several lines of code) …
</script>
Copy and paste in your file under <header> tag