How-to: Add a Visitor Counter like Drudge Report

Screenshot 2014-08-18 13.32.09One of the fun features of The Drudge Report (www.drudgereport.com) is a visitor counter on the bottom of the right-hand column. This shows how many visitors have been to the site in the last day, month, and year. How this is being calculated or how accurate it is remains a mystery but even a fraction of this kind of traffic would be a dream come true to many site owners (but a nightmare to their web host).

The best way to count visitors to your site for your own purposes has been and remains Google Analytics (plugin options abound) but how can you share that data with your site visitors? How do you show off your popular site?

A WP-Drudge user, Josh Z, runs a site called Steve Job’s Garage and found a nice combination of a plugin and a bit of custom code to replicate this feature. Big thanks to Josh for sharing this!

First, download and install WP Slimstat Analytics, then go to Appearance > Widgets and add a “Text” widget where you would like the stats to appear. Inside the box paste these shortcodes and text:

[slimstat f='count' w='*' lf='day equals today'] TODAY

[slimstat f='count' w='*' lf='day equals yesterday'] YESTERDAY

[slimstat f='count' w='*' lf='month'] MONTH

Set the title to whatever you’d like and check the “Automatically add paragraphs” box to add the proper spacing. Save the widget and you will see the stats on your site. The counting starts when the plugin is activated so you’ll probably see a “0” there until you get your first few visitors.

Here’s what it looks like on my site (right side):

Screenshot 2014-08-18 13.43.42

2 responses to How-to: Add a Visitor Counter like Drudge Report

  1. Robert

    January 6th, 2015 at 9:44 am

    I downloaded the plug ins. uploaded to the plug in tool, activated them, added the text widget, pasted in the above code and on the site it just shows the text as pasted vs. showing stats? Is there a trick to this? Thanks.

  2. Robert

    January 6th, 2015 at 11:17 am

    Figured it out. Removed one bracket from each double set! So far so good!

Leave a Reply

Your email address will not be published. Required fields are marked *