Home » Blogger Tutorials, Tricks and Hacks » Put A Simple Statistics Widget In Your Blog

Welcome to our AllBlogTools.com v.3 new version, We are still in beta, please contact us to report an error.

|| View All Tutorials ||

Put A Simple Statistics Widget In Your Blog

Put A Simple Statistics Widget In Your Blog

1 Star2 Stars3 Stars4 Stars5 Stars

Report Error


Thanks to Blogger-Master, here’s a nice Blogger feature that you can put in your blog that will give your readers a quick look at your site’s stats. It’s a statistic widget that shows the total number of posts, comments, and online visitors.

Installing this widget is easy! Just copy the code below:

function totalPosts(json) { document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b>
'); } function totalComments(json) { document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b>
'); }
<script src="%20/feeds/posts/default?alt=json-in-script&amp;callback=totalPosts">
<script src="%20/feeds/comments/default?alt=json-in-script&amp;callback=totalComments">
Users online: <b><script src="http://fastonlineusers.com/on3.php?d=your%20website.com" type="text/javascript">
  1. Login to your Blogger
  2. Head over to ‘Layout’ in your Dashboard then click on any ‘Add a Gadget’ button where you intend your stats to be displayed (ex. on the sidebar)
  3. On the list of gadgets window, scroll down and select ‘HTML/Javascript
  4. Paste the code you copied onto the ‘Content’ box of the gadget window (providing a ‘Title’ is optional) then ‘Save’ the widget
  5. Click on ‘Preview’ to see how the widget looks on your blog then just ‘Save’ your template when you’re satisfied

Hope you enjoy having this feature on your site. Cheers!

Liked It ? Please Share

Comments will be closed off on this post 365 days (1 year) after it is published. Apologies to this, but it's all about avoiding a growing comment spam problem. See our most recent posts where you can comment here