Google Analytics Code
Add Google Analytics to Website
- By Mohammad --
- Monday, 31 May, 2021
- Log in to your Google Analytics account
- On the bottom left-hand side of the page, click Admin
- From the left column titled Account, select an account from the dropdown menu
- From the middle column titled Property, select a property from the dropdown menu
- Under the Property column, click Tracking Info > Tracking Code
- Your website’s unique tracking ID is shown at the top of the page under Tracking ID and starts with UA
Add Following Script your Html Code <!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
SCRIPT async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXX-X" /SCRIPT
SCRIPT
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-141042322-1');
/SCRIPT
Note- replace XXXXX-X with your unique tracking ID