FeedBurner: Display your stats using the API
Recently, I’ve been on a bender to clean up my site and remove all the odds and ends that take away from the theming, and most of all – don’t add to the visitor’s experience.
One of the items I removed was the Feedburner stat widget. I wanted to put my statistics up by my actual RSS button (see this article on how to implement my RSS badge), but make it look natural.
The first step was a little lazy, I didn’t want to recreate the wheel. I searched for a Feedburner stats plugin out there and found a great Feedburner API Wordpress Plugin by Eric Davis.
One minor edit to the plugin was that I wanted to add a thousands separator (“,”). Within the function FB_GetCirculation, I updated the echo statement to add the number formatting I needed:
echo number_format($circ);
Activate the plugin and the next step is to put the stats in your sidebar of your template:
Circulation: <?php FB_GetCirculation($dates = 'last_month'); ?> Subscribers
Next, I’d like to recreate this plugin with Clicky Web Analytics so I can also tout the visitors to my web site, not just the feed subscribers. As well, I think the Feedburner plugin should cache the result – no need in hitting the API all day like it is.