S U N D A R R A J A N

Google Search Engine

Saturday, June 13, 2009

STATISTICS WIDGET FOR BLOGGER

Just came to know about this cool widget n it’s easy to use also. This widget basically shows Quick Stats Of your blog which includes “Total Posts” n “Total Comments” on your blog.You can see the working of it in my blog in the sidebar at the bottom.

If you are interested to display the total number of posts and total number of comments on your blog, please follow the instructions below.

1.Log in to your Blogger account.

2.In your Blogger Dashboard, click on the “Layout” link.

3.This will bring you to the “Page Elements” tab. Decide where you want to insert the statistics widget and click on the “Add a Gadget” link accordingly.

4.Scroll down the list and click on “HTML/JavaScript” button.

5.This will open the “Configure HTML/JavaScript” window. In the title section, please type “Blog Statistics” or “Blog Information” or “Blog Data” or any title you wish to.

6.In the content section, copy & paste the following code exactly:

<script style="text/javascript">

function numberOfPosts(json) {
document.write(’Total Posts: <b>’ + json.feed.openSearch$totalResults.$t + ‘</b><br>’);
}

function numberOfComments(json) {

document.write(’Total Comments: <b>’ + json.feed.openSearch$totalResults.$t + ‘</b><br>’);

}

</script>

<ul><li><script src=”http://yourblog.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts”></script></li>

<li><script src=”http://yourblog.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments”></script></li></ul>

<center><span style=”font-size:75%;”><a href=”http://assessmyblog.blogspot.com/” target=”_blank”>Assesmyblog</a> | <a href=”http://www.smartbloggerz.com/” target=”_blank”>Smartbloggerz</a></span></center>

7. Remember to replace the text “yourblog” with your blog address. Note that you replace it in two locations.

8. Click on “Save” button and Check your blog.

You will see a small widget in your sidebar with the “Total Posts” n “Total Comments”.

Is this bolg useful?

Rate

S U N D A R R A J A N

Followers