Google analytics is a free service to analyze the audience of your website. A large part of the administrators of the websites use it. It is a very powerful tool that collects user data to identify them and analyze their behaviors in order to better understand your users and adapt your strategy in return. This tool will help you a lot in improving your SEO. We will see in this tutorial how to add Google Analytics with Joomla 4.
You must at first create a Google Analytic account, then log in to your account and find a code similar to the one in the screenshot below.
You can found it in the Administration > Tracking Information > Tracking Code section.
Copy this code and continue on the back-end of your site to copy it to your file, via System > Site templates > Your Template. In your index.php file, place your code in the first position just below like this :
tag.The results are not immediate, it will be necessary to wait about a day before having your first statistics.