Tracking the performance of a site can never be ignored. If you’re running a WordPress site, you should always keep a close watch on people who are visiting it, the amount of time they are spending and the percentage of traffic coming from search engines among others. There’s little doubt that Google Analytics is one of the best tools that helps you track all these and a lot more. Most importantly, it’s available at no charge.
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.