To set up Google Analytics on your website, you’ll need to create a Google Analytics account and obtain a tracking code. Here’s an overview of the steps you’ll need to follow:

Go to the Google Analytics website (analytics.google.com) and click the “Start for free” button to create a new account.

Follow the prompts to set up your account, including providing your website’s name and URL.

Once you’ve set up your account, you’ll be taken to the admin section of your Google Analytics account.

In the admin section, click on the “Data stream“ tab and then “Web“. Add stream if no steam created.

In ‘Web stream details‘, click ‘View tag instructions‘ at the bottom of the page. Click ‘Install manually‘.

Here you will find your tracking code. It will look something like this:

1
2
3
4
5
6
7
8
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');
</script>

Add this code in your HTML, before the closing </head> tag on every page you want to track.

Replace GA_MEASUREMENT_ID with the actual measurement ID provided by google analytics, this tracking code will allow you to track and analyze traffic to your website.

You can just copy and paste since Google has already offer you the correct code with your correct GA_MEASUREMENT_ID.

Please note that it may take some time for data to appear in your Google Analytics account after you’ve added the tracking code to your website.