One Mom’s Journey from Fat to Skinny to Confident


Tracking Your Blog Statistics with Google Analytics

31 Comments 2255 views

I would love to monitor my blog’s traffic so I can get a sense of its readership and stats, but sadly I’m not sure how to go about it. Any recommendations?
Diana (Soap & Chocolate)

Hi Diana!

I DO have a recommendation. :) One of the most important things you can do when you manage a web site is gather statistics. What’s your most popular content? What search terms do people use to find your blog? When do people read? Knowing this kind of information is not only interesting (at least to this geek) but it can make you a better blogger in the process.

If you aren’t currently tracking you may be surprised to find that one of the most powerful, comprehensive statistic gathering applications is free. That’s right FREE! All it takes is placing a little bit of code on your blog.

Get the Google Analytics Code

Go to the Google Analytics page and sign in with your google account or create an account (note: if you blog on blogger/blogspot the account info should be the same)

Once you are logged in you you will have to sign up for Google Analytics. Click the sign up button. (as of writing this tutorial it’s in the lower left hand side of the screen) Information you’ll need…

  • Website’s URL
  • Account Name (What ever you want to refer to your statistics as)
  • Country
  • Time Zone
  • Name
  • Phone

Once you fill in the information and click next a few time you will be presented with this screen.

Google analytics

The tracking code is all the text in the box starting with <script type="text/javascript"> and ended with </script> Simple copy that code, place it in the template of your blog and click finish! You’re on your way!

Wait. What? You don’t know how do that? No worries! I’m here to help. Now, this step may be different depending on the blog tool you use. I’m familiar with Blogger and WordPress so that’s the two I will cover.

Installing Google Analytics Code for Blogger (Blogspot)

Click on the Layout Tab.
Then select Edit HTML option.

Under the title Edit Template, You will see a text box with a bunch of HTML code in it. This is the template code of your site. Every page in your blog is based on this code.

Navigate to the bottom of the Edit Template text box until you see


Like so…

Installing Google Analytics Code for Blogger (Blogspot) 2

Now simply put your cursor before the </body> tag and paste the google analytics code.

Installing Google Analytics Code for Blogger (Blogspot)  - 3

Click Save Template.

Go back to Analytics and click Finish. It will take 24 hours for your first statistics to appear.

Installing Google Analytics Code for WordPress

Before I get into the how there is one important thing to note about WordPress. If you are on you can not install analytics. They do not allow it for security reasons, plus they track statistics using analytics already and google will not allow two accounts to track the same site.

However if you host your WordPress blog someplace else then installing the Google Analytics code is a synch!

Installing Google Analytics Code for WordPress - 1Navigate to Appearance Tab and click Editor. This may look difference depending on your version of WordPress. Here’s how it looks in 2.7.

This will bring up a page with a large text box with CSS code in it. However you don’t want to edit the CSS you want to add the code to bottom of your template. To do that click Footer (footer.php).

Installing Google Analytics Code for WordPress - 2

You’ll know you are in the right place if you see Footer on top of the text box. The text in your footer file may be vastly different then mine depending on your theme. However if you scroll down to the bottom you *should* still see


Simply put your cursor before the </body> tag and paste the google analytics code.

Installing Google Analytics Code for WordPress - 3

Click Update File.

Note: If the </body></html> tags are not in your footer file they may be in Main Index Template (index.php) file. It can vary from theme to theme.

Go back to Analytics and click Finish. It will take 24 hours for your first statistics to appear.


Once you have the code installed wait 24 hours and check you stats back on Google Analytics. The amount of information can be quite overwhelming at first but the collection of the data is invaluable. Especially if you are or will be working with advertisers for your blog.

If you found this information useful let me know. I was thinking of a few more Google Analytics posts to help navigate it and find useful statistics about your blog.

Hope this helps!

Leave a comment

I’d love to hear your story or thoughts on mine.

However, to prevent the massive amounts of spam I was receiving I have turned off comments on any post older than 5 days old. If you'd like to leave me a note regarding this post or anything really try me on twitter (@RoniNoone,) my Facebook page, or even IG (@RoniNoone) I'm so sorry for the inconvenience. I never thought I'd have to do this but it's gotten way out of hand and comment management has become simply too time consuming to manage.


There are 31 comments so far.


    March 25, 2009

    Great information! Thanks!

    Anne Marie

    March 25, 2009

    thanks, roni! i was wondering how to do that!

    Diana (Soap & Chocolate)

    March 25, 2009

    AWE-SOME. Thanks so much! (For the shout-out as well:) ) This is more helpful than I even dreamed of. I will get on this – STAT! :P

    Lola Fierce

    March 25, 2009

    Thanks Roni. I have a very quick question…sort of related to CSS…let’s say you want to increase the spacing between your paragraphs, like right now it is set to 1.5 and you want it to be set to 2. How the heck do you do that? Where? I’m guessing its in the CSS, but I don’t see an obvious place. Halp!

    Lola Fierce

    March 25, 2009

    Oh, one more question. you say, “if you host your wordpress blog somewhere else…” Huh? What do you mean? Sorry, I know its a dumb question….but really, very green here.

    Laura Brandon

    March 26, 2009

    I’ve been using Google Analytics for a while, but one thing I can’t figure out – how the heck do you tell what time people are coming to your blog?


    March 26, 2009

    Great resource. I’ve used this other sites and the stats are amazing.


    March 26, 2009

    Laura – I’ll put that on the list! :)


    March 26, 2009

    Excellent site – thanks for your help!


    March 27, 2009

    Hi Roni! Thanks for this great piece of info!

    I got the code from google analytics but when I try to add it to my wordpress footer.php I don’t have ‘update file’. Instead I have a text saying I don’t have the required file permissions and that I need to make the file accessible to writing first before I can make any changes. Any idea what I need to do to change this?



    March 27, 2009

    Thanks for the great post! I would definitely appreciate more posts on navigating and understanding Google analytics, I’m just starting my blog and not really sure what I should be looking for in terms of traffic, visitors, etc. thanks!


    March 27, 2009

    Nathalie – You have to change the permission of the files to allow wordpress access to them. That’s one of those things that depends on you hosting company. This may help…


    March 27, 2009

    Thanks Roni!

    Actually my boyfriend is hosting it on his server :) He’s a computer tech but he’s more into servers and routing and hardware than htlm and programming, so I’m learning how to make my blog on my own. I repeated what you said to him and he’s working his magic as we speak… it should work soon!


    March 27, 2009

    way it works! thanks again :)


    March 28, 2009

    Lola – your css question is tough because there are so many ways to do it. You may want to try adding this to your css file and see the result…

    line-height: 1.4

    As for your hosting question.. some people, myself included chose to host our sites on a different server then just signing up for a account. We actually install the software ourselves.

    Hope that helps!


    March 28, 2009

    I have found Google Analytics has some great info, but there is NOTHING more accurate than your host data. I have been shocked at the difference and my only guess is because Google requires javascript, enough computers refuse to run it and therefor you lose a lot of potential traffic data.

    I just got awstats on one of my two main websites (I’m also a blogging, website junkie!) and it was better than Christmas to have it! Their web traffic was OK but oh how I love awstats!


    March 29, 2009

    Thanks Roni. I just added it to both my blogs!


    March 30, 2009

    I love analytics. Future posts on this would be great, knowing more about the reports and how you use the info would be interesting. Thanks.


    March 30, 2009

    I have a blog and use Feedburner for email to subscribers. Over the weekend, FB started emailing comments along with article posts. Any idea why this happened?


    March 31, 2009

    I would love more reports and how to use the information given to us. I do have a question, yesterday Facebook sent me 15 visitors from the Home Page. I followed the traffic source link trying to find out how all these people found my blog but couldn’t figure it out? Any way to see exactly the link they clicked on from Analytics???


    April 4, 2009

    Laura… I got you.. :)


    May 6, 2009

    how easy was that? you are great at explaining and it is most appreciated!

    You rock! Thanks for the help on this! I just started my blog and I’d love to get your feedback:


    June 5, 2009

    My biggest piece of advice… customize if you can. Distinguish your blog from the default templates. :)
    Looks great!


    September 24, 2009

    Thank you! Seems like everywhere I went on the web there was an assumption that I knew instinctively where to find that tag!

    Kelli Garner

    September 26, 2009

    Great site, how do I subscribe?


    July 23, 2010

    Just used your tips on my wordpress site. Thanks so much!