Guide for Installing Google Analytics in a WordPress Website

Guide for Installing Google Analytics in a WordPress Website

Google Analytics is a great tool you should consider installing in your website. It will help you know how your audience is interacting with your website; something that is essential for success. It is only through the traffic stats that you will be able to learn more about your audience. This post takes a look at the process of installing Google Analytics in your WordPress website.

How will Google Analytics help?
Prior to installing any plugin, it is good to know how it will help you. With Google Analytics, here are some of the things it will help you learn:

  • Who visits your website
  • What visitors do on your website
  • When do you get most visits
  • Do they find your website through search engines, referral links, and direct links or from other sites?
  • How do visitors interact with your content

The above are essential pieces of information you need to have. Having the above information will help you know what to do to improve performance. With that out of the way, let’s take a look at the installation process.

Signup with Google Analytics
You obviously have a WordPress website at this point. The next thing you need to do is to sign up with Google Analytics. You do so by visiting analytics.google.com. You will be required to sign in using your Gmail account. Ensure that you select website on the next screen. You will get a Google Analytics tracking code once you are done with the signup. The code has to be entered in your WordPress website once you install Google Analytics.

Installing Google Analytics
There are many ways of doing this. This post will take a look at the three main methods that you can use:

  • Using MonsterInsights

MonsterInsights is a popular Google Analytics plugin with more than a million users using it. There is both a free and a pro version of this plugin. Install and activate this plugin then head to Insights>>Settings. To connect Google Analytics, you need to click on ‘Authenticate with your Google Account’. This is found under settings. You will be required to enter the tracking code you received after creating the Google Analytics account. Once that is done, you just need to pick the profile that you wish to track.

  • Insert headers and footers plugin

This method is not as good as MonsterInsights. To use it, you need to install and activate Insert Headers and Footers plugin. Go to Settings>>Insert Headers and Footers. It is here that you need to paste the Google Analytics tracking code.

  • Install in WordPress Theme

This option is for the advanced users. The reason for this is because updating or switching themes will cause the code to disappear. To use it, you need to Add code in header.php file. You edit the header.php file of the WordPress theme then paste the Google Analytics tracking code after <body> tag. The tracking code can also be added to the WordPress functions file. This will add the code automatically to all pages.

These are the key options you have when installing Google Analytics in WordPress website. If you are not sure of what you are doing, don’t hesitate to get help.

Google Analytics