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.
Table of Contents
How To Create A Google Analytics Account
- Go To Google and search for Google Analytics.

- Use your Gmail Id and Password to Log into your Google Analytics Account.

- You will get a Welcome Message from Google Analytics on its screen.

- After that, you will have to fill an account name. I have used the name Convey Arena. You can use any name.

- You will be get options to choose between Web, Apps, or Apps & Web, on the below screen Make sure you select the option Web.

- 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.

- 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.

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.
- Real-time will show you a real time view of your traffic.
- Audience will help you understand your users.
- Acquisition reports will show you where your users are from.
- Behavior will show the behavior of your users i.e. what they do on your site.
- Conversion will show how well you are performing.
Also See, Best Google Adsense Alternatives For Bloggers (2020) 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

- 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.

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 #
<head>
Paste your Google Analytics Tracking Code Here
</head>
OR
Create a function in the functions.php and put the code in that file.
# functions.php file #
<?php
add_action('wp_head', 'wp_add_googleanalytics');
function wp_add_googleanalytics()
{ ?>
Paste your Google Analytics Tracking Code Here
<?php
}
?>
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.
4 Comments
Really nice.
Thanks.
Nice,but can you please mention a few more plugins?
Yeah Sure! Few more plugins are,
1). MonsterInsights
2). Analytify
3). WP Statistics