Tracking the performance of a website can never be ignored.
If you’re running a WordPress site, you should always keep on the website traffic that you are getting, the amount of time they are spending on your site and the percentage of traffic coming from search engines among others.
Google Analytics is one of the best tools that helps you track all these and a lot more. It’s a free tool.
Here’s how you can add Google Analytics to your WordPress site in just a couple of easy steps –
- Sign in to your Google Analytics account.
- Collect the tracking code for your site.
- Copy the code.
- Log in to your WordPress dashboard.
- In the left navigation, go to Appearance and click on Editor.
- Open your theme’s header.php file.
- Paste the code just below <body> tag.
- Click Update the File button to save the changes.
This is the direct method of adding Google Analytics code to your WordPress site. There’s one more way to get it done.
There are several plugins that will automatically add the code to your site.
All you need to do is find one such plugin, install and activate it.
Then you can simply place the code in the box that the plugin provides and it will add the code to your site’s files automatically.
When you don’t want to mess with the codes on your site, you should use plugins.