image


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:
<script>
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>
<script src="%20/feeds/posts/default?alt=json-in-

script&amp;callback=totalPosts">
</script>
<script src="%20/feeds/comments/default?alt=json-in-

script&amp;callback=totalComments">
</script>
Users online: <b><script src="http://fastonlineusers.com/on3.php?d=your%

20website.com" type="text/javascript">
 </script></b>
  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!

0 comments:

Post a Comment

 
Top