Using Google Analytics In WordPress

Google Analytics is one of the best tracking and reporting tools for your website. It tracks and reports your website traffic. If you own a wordpress blog, you would like to know, who visited your blog, which time was the blog visited, how much time was spent on the blog, which post and pages were visited etc. All this information is extremely relevant, as it gives you a basic idea of where you are as a blogger. You should know, how your audience interacts with your website, so that, you can make good use of the information, to monetize your blog and earn from it.

In today’s article we are going to learn, how you can use google analytics in your WordPress blog. But first, you need to have a google analytics account.

Considering that you already have a gmail account, we will proceed further.

How To Create A Google Analytics Account

Google Search Of Google Analytics
  • Use your Gmail Id and Password to Log into your Google Analytics Account.
Google Analytics Sign In Page
  • You will get a Welcome Message from Google Analytics on its screen.
Google Analytics Welcome Message
  • After that, you will have to fill an account name. I have used the name Convey Arena. You can use any name.
Google Analytics Create Account Page
  • You will be get options to choose between Web, Apps, or Apps & Web, on the below screen Make sure you select the option Web.
Google Analytics Select Web Option
  • Fill in your property details such as your blog name, blog url, blog category etc, on the page below. My property is Convey Arena, so I have filled details accordingly. Once you have entered this information, click on the Next button. You will go to a page, where you will find, Google Analytics Terms & Services. Click on the I Agree button.
Google Analytics Property Details
  • Now you will get your Google Analytics Tracking Code. This code is what you will be dealing with henceforth for all tracking purposes. I would suggest that you copy this code and save it on notepad, so that you can use it easily whenever needed.
Google Analytics Tracking Code

You will see the Google Analytics reports in the left column. Each section is divided into different sub-sections namely, Real Time, Audience, Acquisition, Behavior, Conversion etc.

  1. Real-time will show you a real time view of your traffic.
  2. Audience will help you understand your users.
  3. Acquisition reports will show you where your users are from.
  4. Behavior will show the behavior of your users i.e. what they do on your site.
  5. Conversion will show how well you are performing.
Also See,

Best Google Adsense Alternatives For Bloggers

How To Optimize Images For Your Website Or Blog

How to Join Amazon Affiliate Program

How To Create A Site Map For Your Website

How To Check The Speed Of Your Website

Methods To Add Tracking Code To WordPress

Since we have got our tracking code now, we will see two methods by which we can add the tracking code to our wordpress blog.

Using Plugin Method : Insert Headers and Footers Plugin
  • Install and Activate the Insert Headers and Footers plugin from your wordpress dashboard by going to Plugins => Add New
Install And Activate Insert Headers And Footers
  • After activating, go to Settings » Insert Headers And Footers page, copy and paste your Google Analytics Tracking Code into Scripts In Headers and click on Save Changes.
Headers and Footers Plugin

That is all you need to do. With the Insert Headers and Footers Plugin, you can easily put your Google Analytics Tracking Code on your website.

Using Manual Method

You can either put the Google Analytics Tracking Code in between the <head> </head> section of your header.php file, by going to Appearance => Theme Editor

# header.php file #


Paste your Google Analytics Tracking Code Here



Create a function in the functions.php and put the code in that file.

# functions.php file #

add_action('wp_head', 'wp_add_googleanalytics');
function wp_add_googleanalytics() 
{ ?>

Paste your Google Analytics Tracking Code Here


Google Analytics is an amazingly powerful tool with loads of different features and it can help you in getting to know the health of your blog. Every blogger should use Google Analytics.

A passionate & enthusiastic blogger & part of the Team at Convey Arena, a website, that deals in Affiliate Marketing, Blogging, SEO, Web Hosting and WordPress.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top