Google Analytics is the bestwhen it comes to websites and blogsites auidience and traffic analytics tools. Many  users find it difficult to do, when it comes time to adding Google Analytics to their WordPress and start tracking activities their site. To help with that, we’re going to show you how to add Google Analytics to WordPress using different methods. In this post, we will make reference to different plugins to help you choose the one you prefer best.

What is Google Analytics?

Google Analytics is a free website tracking service that reports website traffic, conversions, user behavior, and more. It is the most popular website tracking service available.

Google Analytics can show you how much traffic your website receives, where that traffic is coming from, and how visitors interact with your site once they arrive.

You can also export Google Analytics data in various formats or build your own custom “Dashboard” that easily provides and updates the data you want to see.

Why is Google Analytics Important for Bloggers?

Who visits your website?

Everyone setting up a website has a goal in mind. Perhaps the goal is to blog about your passion, launch a small ecommerce business, or just to have a space where your friends can come together online. This part of analytics answers what is the geographical location of your audience, which browser did the user use to visit your site and many other important information such as: screen resolution, JavaScript support, Flash support, language and more.

What do people do when they are on your website?

One of the best features of Google Analytics is the price. Even if you are not remotely interested in see how visitors interact with your website, it is still easy to implement this tracking and start gathering data quietly in the background, all for free!

By using this information, you can decrease the bounce rate and increase your pageviews. You can track where the user is going on your website, how long do they stay on your website, and what is the bounce rate (the percent of users exit your site on the first visit).

When do people visit your website?

By looking at the hottest hours in the day for your site, you can pick the time when you publish your post. If that time zone is not compatible with yours, then you can schedule your post to meet that hour.

How Does Google Analytics Work?

  • Pageviews: The number of individual pages a visitor goes to on your site.
  • Sessions: The number of individual visitors your website receives.
  • Traffic Source: Where your site visitors came from (A Google search, a paid Google ad, another website, directly to your site, a social media network, etc.)
  • Bounce Rate: A measure of how many visitors came to one page on your site and then immediately left.
  • Session Duration and Pages per Session: Measurements of how long someone stayed on your site and how many pages they visited during their Session.
  • Goals (sometimes referred to as “Conversions”): These are a measure of how many people completed an action on your site, as stipulated by you. For example, if you have a contact form, you could measure how many people filled out and submitted that form, where they came from, etc.
Also Read  Best Online Survey to Make money

Installing Google Analytics on your Site

First you need to create a Google Analytics account. To do this, visit Google Analytics Signup Page. If you already have a google account (either gmail or any other service they offer), you don’t need to register. Just sign in and that is it.)

Once you sign-in with your Gmail account, you will be prompted to a screen like the one below. This is where you will signup for Google analytics with your Gmail account.

On the next screen, you will be given choice to choose between a website or mobile app. Select the website option.

After that you need to enter account name (It will be the Google Analytics profile name for this website), Website name, website’s URL, country, and the time zone.

Once you have entered this information, click on the Get Tracking ID button. You will be presented with Google Analytics terms and service which you must agree to, so click on I Agree button.

Now you will be presented with your Google Analytics tracking code. You can copy this tracking code because you will need to enter it in your WordPress site depending on the method you use below.

Leave the analytics browser tab open as you may need to revisit it, once you have installed the code on your WordPress site.

How to Install Google Analytics in WordPress

First, we’ll show you a simple way to add Google Analytics to WordPress using a free plugin. Then, we’ll show you four more ways – how to manually add the Google Analytics tracking code directly to your theme and how to use a slightly more advanced Google Analytics plugin to both add the tracking code to your site and view basic stats about your site right inside your WordPress dashboard. You could also add Google Analytics to your site with the Google Tag Manager or sync it locally for those of you picky about performance.

Also Read  Install WordPress on Local PC

Method 1: Add Usign Analytics Cat

Analytics Cat is a lightweight Google Analytics plugin, While it is lightweight, the advantage of Analytics Cat over other lightweight tools is that it has some Google Analytics-specific functionality that lets you exclude certain logged-in users from being tracked to ensure the integrity of your Google Analytics data. And the best part s, it takes only a few minutes to setup

Go directly from your WordPress dashboard and click through Plugins → Add New, after activating the plugin, go to Settings → Google Analytics Manager to complete the setup. The first page you see, the plugin will ask to you to connect your site, you can click the blue button and follow the on-screen pop upsetting to automatically link it up with Google Analytics without much stress. But that’s not necessary to use. Feel free to click Skip This Step

Now, all you need to do is enter your Google Analytics ID and choose which users to exclude from tracking.

We recommend leaving the Exclude Users option as the default.

To find your Google Analytics ID, head to your Google Analytics account. Once you’re logged in:

  • Click the Gear icon to access your administration page
  • Select Tracking Info to expand the list
  • Select Tracking Code

Ultimate Guide to Install Google Analytics for WordPress

Ultimate Guide to Install Google Analytics for WordPress

Method 2: Google Analytics Using MonsterInsights

It is the easiest and by far the best way to add Google Analytics to WordPress (for all users beginners and experts).

MonsterInsights has both a free version and the Pro version. In this tutorial, we will be using the MonsterInsights free version.

The first thing you need to do is install and activate the MonsterInsights plugin.

Upon activation the plugin will add a new menu item labeled ‘Insights’ to your WordPress admin menu. You need to visit Insights » Settings to configure the plugin settings.

On this screen, you need to click on ‘Authenticate with your Google account’ button to connect Google Analytics to your WordPress site.

This will redirect you to Google accounts where you will be asked to sign in or select a Google account if you are already signed in.

Click on ‘Next’ to continue.

Also Read  Best Blogging Platform to Make Money 2019

Now you will be asked to allow MonsterInsights to access your Google Analytics account.

Click on the ‘Allow’ button to continue.

The final step is to select the profile you want to track. You need to select your website here and then click on the ‘Complete authentication’ button to continue.

You will be now redirected back to your WordPress site.

That’s all you have successfully installed and setup Google Analytics on your WordPress site.

Remember, it will take Google Analytics sometime before showing your stats.

The best part about MonsterInsights is that you can view your Google Analytics report on your WordPress dashboard. Simply visit Insights » Reports page to check out a quick overview of your analytics data.

To Manually Enter Your UA Code: If you prefer to manually enter your user account number, simply check the “Manually enter your UA code” box.

Then go back to your Google Analytics account, click on the “Admin” link in the main menu, and then click on “Property Settings” under the center “Property” column.

Copy the code under “Tracking ID” (be sure to include the “UA” portion) and paste the code into the field in the plugin.

Click the “Save Changes” button and your site is now tracking your visitor data! Again, allow 12-24 hours for data to populate.

Method 2: Google Analytics Using Manual Method

This method as three options, which are:

Add via Functions File

You can also add Google Analytics tracking code to WordPress functions file. It will then automatically add code to every page on your WordPress site.

You will need to add this code to your theme’s functions.php file. It is preferable you use a child theme for this process

add_action('wp_head', 'cmsfolks_add_googleanalytics');
function cmsfolks_add_googleanalytics() { ?>
// Paste your Google Analytics code from here
<?php } ?>

Add code to the header.php file

Simply edit the header.php file in your WordPress theme and paste the code you copied in step 4 right after the <body> tag.

Don’t forget to save your changes and upload the file back to your server.


If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

CMSFolks Editorial Crew

Editorial Staff at CMSFolks is a team of WordPress experts led by Ajayi Adekunle. Site maintained by CMSFolks Studio.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu


Spelling error report

The following text will be sent to our editors: