Google Analytics is a powerful tool for collecting and viewing statistics about pageviews, user behavior and other useful data. The best part is that it̵
Set up Google Analytics
Go to the Google Analytics dashboard and sign up. If it’s your first time using it, you can just click “Start Measurement” to set it up. If you have an existing site and would like to add another one, click on the settings icon at the bottom left and click on “Create account” to add a new one.
When you create an account, a “Home” is automatically created for you, representing your site. You can have multiple properties per account, but one is fine for one site.
To set up analytics, you need to connect your website to a data stream. You can do this from the settings menu by clicking on ‘Data streams’> ‘Web’.
You must enter your website URL and a name for the stream. Don’t worry, “Advanced Measurements” is free.
On the next screen you will see your “MEASUREMENT ID”. You need this to connect it to WordPress.
Enable Google Analytics in WordPress
There are a few ways to add the script to WordPress. If you are comfortable with customizing your site directly, you can easily add the tracking script to it