How to Set Up Google Analytics for WordPress blog

Launching a new website or a blog can be a complicated and time-consuming process. One must think of so many things, like domains, hosting, WordPress editor, SEO, and what not! I have already covered most of these steps about How to start a blog here. But what’s the use of having a blog without any audience or the one that doesn’t appear under the search engine? That’s what we’re going to do in this post. I am going to help you with How to Set Up Google Analytics for your WordPress blog

So, you must be thinking, Why do you need Google Analytics for your WordPress blog?

Ideally speaking, setting up Google Analytics in WordPress should be the first step after you finish designing a WordPress blog. That right! Even before you start writing the content for your WordPress blog. While blogging, you need to keep track of the traffic, see what you’re doing right, change your strategies, which pages are performing well, to boost more traffic to your WordPress blog and earn money from your WordPress blog. 

Here comes Google Analytics. Google Analytics is a free tool that allows you to collect your website traffic and helps you analyze it. 

All this may sound overwhelming at this level, but let me tell you that it is quite a simple process. And I am here to make it even simpler for you. Just a few clicks, and you’ll be able to set up Google Analytics for your WordPress blog.

Let’s get started! 

  1. To set up Google Analytics account, go to

Click on Sign up

Make sure you are using the same Google account you are planning to use for the other things of your WordPress blog. 

2. Add account name, click next

GA name
GA name

3. Choose that you want to set up a website. Click NEXT.

select web

4. Add the property details and click create the account
Accept the T&C 

You are now signed up for the Google Analytics account. Now, let’s connect your website to this account. 

Now, we have to take the tracking code and paste it into your website’s header file.

To do that, there are 2 options:

  1. With header and footer plugin
  2. Using Php code of the theme

Let’s see how to paste this code using both the methods. 

To paste the code using the plug-in, you have to install header and footer plugin:

  1. Go to your WordPress Dashboard-> Plug-ins-> add plug-in -> Insert Headers & Footers
  2. Install the plugin and activate it. 
  3. Go to the plug-in-> and click on the script box of the header. 

Go back to the Google Analytics window, copy the code, and paste it in the header’s script box. 

Let’s see how to do this in another way.

  1. Go to your WordPress dashboard->appearance->theme editor
theme editor

2. Search for header.php file.
3. Copy the tracking code from the Google Analytics and paste it in the header.php file right above the tag. 
4. Save the file

Once you have successfully Set Up Google Analytics for your WordPress blog, it may take up to 24 hours for the data to begin processing.

Congratulations! Your Google Analytics account is now set up. It’s time to submit your blog to the search console. 

Leave a Comment

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