How to Install Google Analytics In WordPress | 3 Best Working Methods

You may have earlier heard of Google Analytics if you didn’t hear then there is no need to worry. You should know how your site’s audience interacts with your website, I mean this is really important for your success. You can easily know the audience through your traffic stats and you will do this with the Google Analytics.  Here in this article, you will know how to install Google Analytics on your WordPress blog.

Importance of Google Analytics for Bloggers:

When you start a blog, your goal is to get more and more traffic on your blog.

No problem you can do that with Google Analytics by data-driven decisions by showing the status. It will help you in knowing the geographical location of your audience along with which browser they are visiting your site and some of the aspects as Flash support, language, JavaScript support, Screen Resolution and many more. The following data will be helpful to you in many ways.

Using all these data you can make your site and content compatible with your audience. Tracking of the audience can also be done along with how long they stay on your site. The bounce rate in which users exit your site on the first view can also be viewed.

Having all the information about your site, look at hottest hours of your site and just pick out a time just to publish your post. You can schedule your post according to the time zone of your particular readers.

Google Analytics will also show you through which search engine you are getting the most traffic i.e. Google, Yahoo, Bing etc.

Let’s move on to the installation process of Google Analytics.

How to sign up for Google Analytics:

Step 1:

 Google Analytics- Sign up

To getting started with it, you need to create a Google Analytics account. Just go on to the Google Analytics Signup page. You can easily sign-in with your Google or Gmail count if you have if you don’t have then create a Gmail account for yourself.

Step 2:

 Google Analytics- Choosing account

Just before sign-in with Gmail account, you need to sign up for Google Analytics to your Gmail account.

Step 3:

Next step is to choose between a website or mobile app, pay attention here and make sure you have selected website.

Google Analytics- Account Setup

The next part is to enter account name for the Google Analytics profile name along with the following: Website Name, Website’s URL, Country and Time Zone of your country.

Just after filling information click on to the Get Tracking ID button. To finish this step you need to click on Agree Button.

Step 4:

Here in this section, you get your Google Analytics tracking code. You can note down this traffic code or you can just copy it because you will definitely need to enter this specific code WordPress site. I will recommend you to just open leave this page open, you may need to revisit it after installing the codes on your WordPress site.

Google Analytics- Tracking Code

Till now we have created the Google Analytics account and generated the tracking code. Now we should move a step ahead and know how to install Google Analytics on WordPress.

How to Install Google Analytics on WordPress:

You may get many ways to set up Google Analytics in WordPress over the Internet but here you will get few methods to install Google Analytics on WordPress. So let’s get started with these:

First Method:

 1.Google Analytics For WordPress (MonsterInsights):

Google Analytics- MonsterInsights

MonsterInsights is the best and the most popular Google Analytics plugin for WordPress in which you can rely upon. Data shows that this plugin is used by over 1 million sites. This process is the easiest and the top-notch way just to add Google Analytics to WordPress.

In MonsterInsights, you will have the choice to choose over free version and the paid version. You should go with the free version but if you want to get some advanced features then you should go with the paid version.

Paid version features:

  • E-commerce Tracking
  • Ads Tracking
  • Author tracking
  • Custom Dimension
  • Enhanced Link Attribution

Let’s start the process here:

All you need to do is to install and activate the MonsterInsights plugin. You will see a new menu labeled as Insights in the WordPress admin menu. Jus visit Insights > Settings for the configuration of the plugin settings.

Now you need to click on to the ‘Authentication with your Google account’ just to connect Google Analytics to WordPress site. During the verification process, you will get a popup about the authentication of the account. Just click on to the next to continue.

Google Analytics- MonsterInsights Authentication

Then click on to the ‘Click to get Google code’.  Just enter the required data and you will get another popup. Now click on the ‘Allow’ button. You will see some code on the authentication pop up and you will have to copy those lines of code.

Copy this code and click on to the ‘Next’ to proceed. Now moving on to the final steps just select the profile you are willing to track.

Google Analytics- Picking A Profile

Now you have successfully installed and setup Google Analytics on your WordPress site. After the setup, it may happen that Google Analytics is not showing your status. Here Google Analytics may take some time to the installation process.

You can visit your Google Analytics report on your WordPress dashboard. Do visit Insights > Reports to get an overview of your analytics data.

Moving on to the second method of installing Google Analytics on WordPress.

2. Insert Headers and Footers plugin:

Here in this method, you may not find this one as easy as MonterInsights because it may happen that you may not be able to do the advanced tracing configuration. The down part of this method is it will not show Google Analytics data on your WordPress dashboard.

Just go install and activate the Insert headers and Footers plugin. Again if you don’t know how to install a WordPress plugin then go through this article.

After the activation process you must visit settings Settings > Insert Headers and Footers page. All you need to is just add the Google Analytics Code that you have already copied.

Google Analytics- Insert Headers and Footers plugin:

Then right after that never forget to click on the save changes option to complete the settings successfully.

Now moving on to the next and the last step.

3. Installing Google Analytics in WordPress Themes:

I am assuring you this method is only for the advanced users only and this one is not for the beginners. If you do have some coding background then you should go with this method otherwise go with the first method.

All you need to do is edit the header.php file in your WordPress theme. Just paste and copy the code that you have copied earlier. Click on to the save changes and just upload your file to the server.

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

Check Reports on Google Analytics Website:

Yes, you can check the data which is collected from your status. Just view this data by going on to the Google Analytics dashboard and there just click on to the reporting tab.

If you want the report in detail then just click on to the detail option the tab and tab will definitely expand and show more options.

Also, read:

End-Note: Install Google Analytics In WordPress

Now you can easily install Google Analytics in WordPress by going through this helpful guide. Do let me know if you are using Google Analytics on your blog in the comment section along with your valuable feedback.

I hope you like this guide on how to install Google Analytics on WordPress. Show your love and support by sharing this article on all trending social media platform.

Kashish Babber
This author is verified on

Kashish is a B.Com graduate, who is currently follower her passion to learn and write about SEO and blogging. With every new Google algorithm update she dives in the details. She's always eager to learn and loves to explore every twist and turn of Google's algorithm updates, getting into the nitty-gritty to understand how they work. Her enthusiasm for these topics' can be seen through in her writing, making her insights both informative and engaging for anyone interested in the ever-evolving landscape of search engine optimization and the art of blogging.

Affiliate disclosure: In full transparency – some of the links on our website are affiliate links, if you use them to make a purchase we will earn a commission at no additional cost for you (none whatsoever!).

Comments (3)

  1. Hi,
    Google Analytics is good for users tracking and you know all activity about Visitor.
    Thanks for sharing …!!! keep up it.

  2. I savor, lead to I discovered just what I was taking a look for.
    You’ve ended my 4 day lengthy hunt! God Bless you man. Have a nice day.

  3. Hey Shubham!

    Using the Google Analytics Tool is such an important part of the process of building a profitable blog online. It is a must that you use this tool to track everything going on on your blog site.

    You don’t want to build blindly. This tool, provided by Google, is such a powerful way for you to gather important data so you can tweak and grow even faster.

    Thank you for sharing such helpful tutorial!

    Best regards! 😀

Leave a Comment