How to Install Google Analytics in WordPress blog

Free WordPress Tutorials for the Beginners

How to Install Google Analytics in WordPress blog feature

You may want to know your website visitors where they are coming from. Google Analytics provides you the detailed insight of your blog traffic. You can track the visitors and optimize your blog posts for better conversion. This tutorial will help you to install Google Analytics in your WordPress blog.

What is Google Analytics?

Google Analytics is free services to track the web traffic provided by Google. It will show you the detailed report of your blog’s visitors, user behavior, conversionGeo location and many more.

Setup Google Analytics

Step-1: Sign Up to Analytics tools.

Step-2: Add Analytics tracking ID to the Website.

Step-1: Sign up to Analytics tools.

You need to have Gmail ID to create an account in Google Analytics tools. If you don’t have one create Gmail ID now.

Once you have your Gmail ID, sign in to Google Analytics account using this link. Type your Gmail ID and click on “Next” button.

create google analytics account

It will take you to Google Analytics Sign up page. Click on “Sign up” button at the right side.

Sign up to Google analytics

On the next page, you have to choose the “Account Type”, choose “Website” to setup Google analytics. Fill all the required details, Account Name, Website Name, Website URL, Categories and Timezone and click on “Get Tracking ID” button.

Setup your website

In the next page, accept Google Analytics Terms and condition checking both the box of Google Agreement and click on “I accept” button.

accept terms and condition

You will see the analytical Dashboard where you can find the tracking code that need to be added into your website. Copy the tracking code and paste into your website in next step.

tracking ID

Step-2: Add Tracking ID to Website

You have already created google Analytics account, now you need to add pieces of code into your website. You can easily add the analytics ID into your blog. Paste the tracking ID in header.php file from the “WordPress editor” or you can also use plugins to add the code in few clicks. Here, we have shown two methods of adding the tracking ID into your website.

Method-1: Add tracking ID in header.php file.

Method-2: Add tracking ID using WordPress plugins.

Method-1: Add tracking ID in header.php file

You can add tracking code to <head> section of your WordPress Editor. Login to WordPress Dashboard and click on “Appearance” and “Editor”.

Now, from the right side, click on “header.php” and pasta “Google tracking ID” before  </head> section. Click on “Update File” button.

Add tracking code

It will take upto 24 hours to collect your website data.

Check Website Report

Once Analytics completes collecting your website data you can login to analytics account and see the report from the dashboard.

Click on “Overview” under “Audience” to see the reports.

analytics reports

Method-2: Add tracking code using WordPress Plugins

Plugins has made WordPress easy and flexible. Monsterinsights plugin is one of the best analytics plugins for WordPress.

MonsterInsight Overview

Login to WordPress Dashboard and click on “Plugins” then “Add new”.  Type “Google Analytics Dashboard for WP” in search box at the right side. You will see the plugin at the beginning. Click on “Install Now” button then activate.


Once activate Click on “Insight” and click “Settings” from WordPress panel to configure the plugins.

Insights settings

You will see the authenticate button to connect your website with Google Analytical. Click on “authenticate with your Google account”.

Authenticate Google AC

It will take you to the screen to choose the Google analytics account. If you are logged in choose associate account or login to Google account and click on “Next” button.

google analytics authorizing

On the next screen, MonsterInsights will ask permission to access the Google Analytics account. Click on “Allow” button.

google analytics authorizing

Now, choose the profile from drop down box and click on “Complete Connection” to finalize setting up Analytics. It will redirect you to WordPress. It will take 24 hours to show the report in your WordPress Dashboard.


We hope this tutorial on How to Install Google Analytics in WordPress blog? is helpful. You can also want to see the guide on How to add website to Google webmaster tools?

There might be many beginners stumbling on this topic, if you find this guide helpful, do not hesitate to share and follow on facebook and twitter

Leave a Reply