How to Install Google Analytics in WordPress

How to Install Google Analytics in WordPress

One of the most fundamental reason for any successful website/blog is statistics of that site. Google Analytics is the best and a free way to know your audience through your traffic stats. In this article we will share with you importance of Google Analytics, and the way to install it in your WordPress blog.

Install Google Analytics in WordPress

Google Analytics allows website/blog owners to do such things as:

  • Who visits your site.
  • Discover how your site visitors came to know about your blog.
  • View the number of visitors your blog receives every day.
  • What are the tasks they do when they are on your website.
  • When they visit your website.
  • View areas on your blog where people have clicked.
  • Know about the most visited article on your site.
  • How they interact with your site’s content.
  • Know the country in which your site is popular.
  • . . . and a ton more.

How to sign-up with Google Analytics

To start with, you need to create a Google Analytics account. To do this, visit Google Analytics sign-Up Page.

The screen like the one below will appear. If you already have a Gmail account, then use that to sign-in with, else you will need to create an account for yourself.

After you sign-in with your Gmail account, you will be prompted to a screen like the one below. This is where you will sign-up for google analytics with your Gmail account.

The third step would be to fill-up your site information. The fields are quiet self-explanatory. You will need to enter your Web site’s URL, Account name (any name of your choice), Time zone country, and the time zone.

Fill General Information

Step 4 requires you to enter your contact information.

Step 5 you have to agree with their terms.

Step 6 is where you will receive the code to paste in your site. This is the most vital part of the sign up. You will need to copy this code and paste it into your blog.

How to Install Google Analytics in WordPress:

There are 2 ways to install Google analytics in WordPress. Manually paste the code and plugins.

  1. Download and use a plugin . . . OR
  2. Copy and paste code into your blog’s footer file.

1. Plugins Method:

There are many plugins available to add Google Analytics code to your site. The two that we recommend are:

2. Adding Google Analytics manually:

Log into your WordPress blog and navigate to your theme’s editor by going to Dashboard -> Appearance –> Editor (Theme editor).

Then on the right you should see a list of your theme’s files. Click on the Footer.php (or index.php) file. Find the </body> html tag.

Copy and paste the Google Analytics code before the </body> tag.

Don’t forget to click Update File to save changes.

To view your site’s statistics now, log into your Google Analytics account and view your stats. Don’t loose your patience immediately if you do not see it in the right way, since it may take a day or so to start receiving your traffic stats.

This is something you must have for every blog, so get it now. If you have any questions then feel free to ask in the comments. If you like this article, then please share it with your friends on twitter and Facebook.


Join Our Email Newsletter

Like what you read here in this blog post? Get free blog updates in your Email!

About Rajesh Namase

Rajesh Namase is a professional blogger and founder of TechLila. He has a great passion in blogging and SEO. If you’d like to connect with him, use our Contact Us page.

Rajesh has written 218 awesome articles for us at TechLila.

Comments

  1. says

    Man, I can’t tell you how helpful this step by step breakdown is for me.

    You mentioned that with Google you can see places where people have clicked on my site. I don’t see in my Google account where to view that?

  2. says

    Thank you for the tutorial and the information that you provided in this blog. This is very interesting for people like me. I’m impressed to find out about this.

  3. says

    I was looking for the manual approach for installing analytics on my WP blogs and you gave me exactly what I was looking for.

    Thanks for the clear step by step.

  4. says

    I follow all your nice advice since I installed Mystique 3 for my blog.
    Unfortunately on mystique plug-in Google Analytics for WordPress by Joost de Valk seems not working. When I access Google analytic page says not installed even if I configured correctly the plug-in. Should I switch plug-in? or even better install code by manually as you explained? in this case do i need to install on every post or once is in footer.php it is enough
    Thanks

  5. says

    Thank you for a most helpful tip. I have also found that some themes like Flexibility have an option permit you to enter your Analytics ID. This saves a deal of effort as well as you do not have to edit the code – much the same as your Plug In option

  6. says

    Yeah it sure is brother! I definitely have all the chance in the world with Google Analytics at my side. I have all 5 of my other websites with it.

 Comment Policy

Your words are your own, so be nice and helpful if you can. Please, only use your REAL NAME, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please. You can wrap code in [lang-name][/lang-name] tags.


Tell us what you're thinking...

If you want a picture to show with your comment, then get Gravatar!

CommentLuv badge