How do I install Google Analytics on my website?
@mike 1. Create a Google Analytics account.
@mike
To install Google Analytics on your website, you will need to follow these steps:
1 2 3 4 5 6 7 8 9 |
<!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-000000-01"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-000000-01'); </script> |
Note: If you are using a content management system (CMS) like WordPress, you may be able to install a plugin that will allow you to add the tracking code without having to manually edit the code of your site. There are also options for adding Google Analytics to your site using Google Tag Manager.