How To Install Google Analytics In WordPress Blog

Add Google Analytics To WordPressDuring my blogging journey, one of the most important thing that I learned about blogging is to know the stats of the blog. Yes stats not only helps you to know how many visitors you are getting but it is a key role in blog growth.

It doesn't matter how many visitors your blog is getting but the most important one is that you need to have a stats program which helps you to track blog traffic and also analyze them. Google Analytics is one of the best free stats programs that every blog should have.

add google analytics to wordpress

As I have already discussed the importance of Google Analytics, So in this tutorial, you will be learning about setting your Google Analytics account and how you can install Google Analytics into your WordPress blog.

Recommended Reading

How to Setup Google Analytics Account For WordPress

Let's start with signing up for Google Analytics account. If you are new to Google Analytics and you don’t have an account yet, then you need to create one first. Google Analytic account is free. Use your Gmail Account Information for signing up to Google Analytics.

And In case, If you already have Google analytic account, then Login to your Google Analytic Account > click on "Admin Tab" at the top > Select "Account" and then click on "New property" to setup Google Analytics for your WordPress blog, BlogSpot blog or any other website. Follow the screenshot for better understanding.


When you are done signing up or adding new property Follow the following steps:

  • On the next page you will have two option Website and Mobile App under the heading “What would you like to track?” Make Sure you select website.
  • On the same page, you need to Enter your "Account name" (can be  anything you want), "Website Name", "Website URL", "Industry category" and "Time Zone". Once you have finished with entering the information. Click on "Get Tracking Id".Google-Analytics-Setup
  • Now a window will open stating Google Analytics Terms and Condition. Click on "I agree".
  • Now a Window will open presenting your "Tracking ID". Make Sure you Copy the Tracking IDGoogle-Analytics-Tracking-Code

Now you have successfully done with Setting up your "Google Analytics" account and Creating the "Tracking ID" for your WordPress Blog.

Now the interesting part of this tutorial begins; as you need to Integrate Google Analytics Tracking ID into your WordPress blog. Now Let’s proceed to the next tutorial on how To add Google Analytics to WordPress.

Guide To Add Google Analytics To WordPress Blog

There are multiple ways To install Google Analytics in WordPress. You Should select the right method depending upon your level of blogging Skills and knowledge.

  • Add Google Analytics Using WordPress Plugins

    You may know that there are lots and lots of WordPress plugins are available to add Google Analytics to your WordPress blog, But I would recommend these 2 plugins, you can choose any one of them.

    Plugin 1: Google Analytics For WordPress

    Google analytics plugin for wordpress

    Firstly you need to Install Google Analytics For WordPress Plugin By Yoast from WordPress directory. After installing Activate the plugin. Please follow the screenshot for better understanding:

    *Click on Analytics and then Click "authenticate your Google Analytics profile here"


    *Under General Settings, Click on "Authenticate with your Google Account".


    *Now In Analytics Section, Select your "Analytics profile" from the drop-down list


    *Click On "Save"

    Now you are done with setting Google Analytics on your WordPress blog.

    Plugin 2: Insert header and footer WordPress Plugin

    Install Insert header and Footer WordPress plugin and Activate it. Go to "Settings" > "Insert header and Footer" >  Setting Section "Paste Google Analytics Code". Then Click on "Save". I would recommend you to paste Google Analytics Code In "Scripts In Footer" Section.


  • Add Google Analytics Using WordPress theme

    Note: This method works on those themes which provide the option to add header and footer script. You can use WordPress theme method to add Google Analytics to your WordPress account.
    Simply "Copy The Tracking Code"(not Tracking Id but the code below Tracking Id in Google Analytics Account) and Go to "Theme Setting Option", Look for the option to "Add Footer Script" and Paste your Tracking code and Click on "Save Settings" and you are done.

    Using Function.php Method

    Add the following code in your theme’s function.php file and click save. Note: Replace paste you Google Analytics code with your Google Analytics code

    function add_googleanalytics() { ?>
    Paste your Google Analytics code
    <?php } ?>
  • Add Google Analytics Using Google Tag Manager

    Google tag manager is free product by Google. and you can install Google Analytics to WordPress using Google tag manager. Here is guide on integrating Google tag manager on your WordPress blog.

Recommended Reading

I must say that Google Analytics is a must for every blogger.Do Let Me Know If You Find This Guide Helpful.If You Enjoy The Article,Don’t Forget To Share It On Facebook and Google Plus and do Subscribe For Updates.


Add a Comment

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