WordPress Plugin: Simple Statistics for Feeds
Simple Statistics for Feeds is a free WordPress plugin that makes it easy to track your feeds, add custom content, and display your feed statistics on your site. Simple Statistics for Feeds (SFS) tracks your feeds automatically, and provides a wealth of tools and options for further configuration and management. To see Simple Statistics for Feeds in action, check out my code-snippets site, WP-Mix.com (you can find the SFS count badge in the sidebar on any page).
Installation & Usage
Upload the /simple-feed-stats/
directory to your /plugins/
folder and activate from the Plugins page in the WP Admin. Then visit the Simple Statistics for Feeds Settings page to view your stats, customize options, grab shortcodes, and more. Everything works automatically out of the box, with plenty of tools and options to customize and manage your feed stats.
How it works..
Simple Statistics for Feeds tracks your feeds using a variety of tracking methods. The default tracking method is recommended for default WordPress feeds, such as:
- Content RDF –
https://example.com/feed/rdf/
- Content RSS –
https://example.com/feed/rss/
- Content RSS2 –
https://example.com/feed/
- Content Atom –
https://example.com/feed/atom/
- Comments RDF –
https://example.com/comments/feed/rdf/
- Comments RSS2 –
https://example.com/comments/feed/
- Comments Atom –
https://example.com/comments/feed/atom/
Basically it tracks all feeds by default and displays your feed statistics on the SFS settings page, like so:
SFS color-codes stats by feed type and displays data in clear, concise format
Tracking methods
Simple Statistics for Feeds provides three four different ways to track your feeds:
- Default tracking – tracks directly via feed request
- Custom tracking – tracks via embedded post image
- Alternate tracking – tracks via embedded feed image
- Open tracking – open tracking via embedded image
As discussed, default tracking is best for default (non-redirected) WP feeds. For feeds that are redirected to a 3rd-party service such as FeedBurner, any of the other three tracking methods may be used, depending on your feed configuration. Custom tracking is recommended when delivering Full-text feeds, while Open tracking is recommended for Summary (or partial) feeds. Alternate tracking is an experimental method that may be used for other scenarios.
Collected data
Simple Statistics for Feeds tracks the following data for each feed request:
- Feed type
- IP address
- Referrer
- Requested URL
- User-agent
- Date and more
Once data is collected, it will be displayed in the SFS Settings page. Visit the Template Tags & Shortcodes panel for info on displaying the stats publicly on your site. Here is a screenshot of the luxe SFS Settings Page:
SFS brings the luxe interface with toggling panels for a fluid, focused experience
Displaying your feed stats
To display your feed stats on the front-end of your site, visit the Template Tags & Shortcodes panel on the SFS Settings page. There you will find multiple options:
Simple feed count (number/text only)
To display your current subscriber count as simple text, add the following template tag anywhere in your theme (e.g., sidebar, footer, etc.):
<?php if(function_exists('sfs_display_subscriber_count')) sfs_display_subscriber_count(); ?>
This is ideal for marking up and styling your own stats button or whatever you want. Alternately, to display your current subscriber count in a post or page, add the following shortcode:
[sfs_subscriber_count]
Feed count badge (like Feedburner)
To display your stats with a badge that looks like the Feedburner chicklet, add the following template tag anywhere in your theme:
<?php if(function_exists('sfs_display_count_badge')) sfs_display_count_badge(); ?>
Alternately, to display a Feedburner-style badge in a post or page, add the following shortcode:
[sfs_count_badge]
When included in a post or page, either of these techniques will display your feed stats to look similar to the FeedBurner chicklet. To customize its appearance, visit the Tools & Options panel and edit the “Custom CSS” field with any styles you wish. This makes it easy to customize your stats from the comfort of the WP Admin.
Add custom content to your feed
Simple Statistics for Feeds also makes it easy to add custom content content to your feeds. Just visit Tools & Options and add text/markup to the feed header and/or footer (see following screenshot):
SFS lets you add custom content to your WordPress feeds
This option is intended to consolidate plugin functionality while providing your readers additional/bonus content. It may also be useful during FeedBurner-migration campaigns (see about the different tracking methods for more info).
More features and tools
In addition to tracking, viewing, and displaying your feed stats, SFS provides the following awesome features:
- Dashboard widget – provides quick overview of your feed stats
- Custom feed content – embellish your feed with custom graphics, markup, and text content
- Custom feed count – display any number or text for your feed count
- Custom CSS – use your own styles to customize your feed stats
- Clear, reset, restore, delete – options to clear the cache, reset your stats, restore default settings, and delete the SFS database table
SFS makes it easy to manage the plugin, its data and options
Plus much more! I’ve put a lot of time and care into making this a robust, flexible, and full-featured plugin, with special attention given to the SFS Settings page. No such thing as too much love.
About the different tracking methods
What’s the best tracking method? For default WordPress feeds, the Default tracking method provides the most accurate results. By hooking directly into the feed-generation process, SFS is able to record data every time someone or something accesses your feed. If possible, use the Default tracking method.
If you’re using FeedBurner you’ll want to continue using their statistics for as long as FeedBurner continues the service. As many of you know, FeedBurner shut down their API on October 20th, 2012. The FeedBurner feed-delivery service will continue until Google decides otherwise, and I think most users will continue to rely on the service until that time.
What if I want to transition away from FeedBurner? Initially, this is why I began working on this plugin. I wanted a solid, open-source alternative to FeedBurner. Honestly, the only reason I use FeedBurner is to track the number of subscribers, which FeedBurner does remarkably well using its own algorithms and a wide variety of data. Unfortunately Google doesn’t make its algorithms and data available to the public, making it virtually impossible to achieve the same “subscriber count” without making some serious assumptions. The SFS plugin tracks organically and does not make any assumptions, meaning that its daily “subscriber count” is a much lower number than the one that FeedBurner provides.
SFS provides multiple tracking options for better flexibility and accuracy
How does Alternate tracking work? Alternate tracking works by injecting a tracking image into the XML of WP-generated feeds. It uses a technique I wrote about back in 2007. For further details, check out Customizing WordPress Feeds (jump to the functions.php
examples).
How does Open Tracking work? Open tracking works by using a tracking URL as the src
of any image. Once the tracking image is included in a page or feed, the SFS plugin uses it to track the page, and returns a user-specified image that’s displayed in place of the tracking URL in the src
attribute. Confusing? Check out SFS Open Tracking for more information.
How does Custom tracking work? Custom tracking works by including a tracking image in the first post of your feed. The SFS plugin then tracks every time your entire feed is accessed. Current plans are to add yet another tracking method whereby the tracking image is included in every feed post. This may produce daily stats that are closer to the ones that FeedBurner delivers. Please share any thoughts you may have on this.
Download
Download Simple Statistics for Feeds from the WordPress.org Plugin Directory:
77 responses to “WordPress Plugin: Simple Statistics for Feeds”
Very useful!!!
Thanks for sharing!
Does using a caching plugin like WP Super Cache or W3 Total Cache cause any problems with the default tracking method?
Good question. It should work fine with caching plugins as far as I know, but let me know if otherwise.
Hi! Great start. Thank you. You saved me from having to switch to Feedburner!
Will this work with category-specific feeds? I make the feeds for each of my top 4 categories accessible for my readers. Will readers of those filtered feeds trigger the script? Is there any way to tell which feed they’re reading?
Glad to hear it! Yes, the default tracking method will record hits for your category feeds, and you can filter/sort the stats on the settings page by
referrer
, which is the feed URL (for the default tracking method). Note: I’ve recently updated the plugin to version 20121025.Thanks for the speedy reply. A++ would install again!
Pretty smart actually, everything I have is pushed through feedburner, but I’m not a massive fan of it.
This is an excellent plugin and I love using it. However, I’m having trouble getting sfs_display_subscriber_count() to display anything other than 0, even though I’ve got over 700 subscribers in the dashboard. The Feedburner badge preview even correctly shows the right number, but not up front using the sfs_display_subscriber_count() function. Any ideas? I’ve tried clearing the cache, but to no avail.
I just checked again and it seems to be working for my sites, but I’d be glad to take a look if you would like. Just send infos to me via email. Otherwise it’s just too difficult to try and guess.
What about adding parameters to the title links for tracking tools like GA or Piwik?
Haven’t tried it.. does it work?
What I meant is:
Is there, or will there be an possibility to add some parameters to the Title link (from RSS to the Website) to track Campaigns?
like
http://campino2k.de/2012/10/25/banananananananenrepublik-das-bmi-will-zugriff-auf-ipv4-daten-anschluesse-und-cloud-daten-von-telekom-unternehmen-gesetzlich-regeln/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+campino2k+%28campino2k.de%29&utm_content=FeedBurner
This sounds like a good idea.. which plugin options would be needed to make it great?
To support different Systems (like Piwik, Google Analytics and other Stuff), there should be an option to add some Key-Value-Pairs with possible Placeholders like “POSTID” and “POSTTITLE”. Maybe http://github.com/sethiele/rss-campain can give you an impression.
The plugin could not be installed because it has caused a fatal error:
Fatal error: Cannot redeclare truncate() (previously declared in (***/wp-content/plugins/wp-thumbie/wp-thumbie.php:244) in ***/wp-content/plugins/simple-feed-stats/simple-feed-stats.php on line 353
Seems to be incompatible with the plugin wp-tumbie.
This will be fixed in the next update, which should be soon :)
I went away from FeedBurner two months ago and since then I’m testing some feed counters. I tried FeedStats, Marco’s Bash (http://www.marco.org/2012/09/25/feedburner-counter-replacement) and now SFS.
While the first two give results in the region like the former FeedBurner, the numbers of SFS are 3-4 times higher. This is flattering, but doesn’t seem to be correct.
I use SFS on two blogs and get the same higher results. In both cases the plugin accumulated data at least for over a week. I’m wondering whether the counting does not eliminate certain duplicates.
Did anyone observe similar results?
What are your feed URLs and I’ll look into it..
Great.
http://www.acky.de/feed
http://www.madnil.de/feed
Thank you!
The only thing that I can think of is that users are requesting the RSS version of your feed (instead of the default RSS2). I’ve discovered that RSS feeds are redirected by WP to their RSS2 counterparts, so currently the SFS plugin records those requests twice (once for RSS and another for RSS2). I’ll be looking into it for the next plugin update.
Is a great plugin. Thanks.
When i installed the plugin and activated, i obtain this:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/luismi/public_html/ocioencomunitat.es/wp-content/plugins/simple-feed-stats/simple-feed-stats.php on line 527
With a wordpress 3.4.2.
Thanks for all.
Thanks Luis, do you know which version of PHP/MySQL is running on the server?
The server data are:
Apache: 2.2.23
PHP: 5.2.17
MySQL: 5.5.23-55
Thanks for all.
Hi Luis, I think I forgot to convert the resource to a string, will get it fixed in the next version. Thanks for reporting.
For some reason I can’t get this to show any stats. I’ve tried every setting because some subscribers come from Feedburner and some the WordPress feed.
Maybe there is some trick I’m missing?
Hmm.. not sure, but it does take time for stats to show.. also the documentation contains further infos.
It’s odd – the feed stats tracking links show up in the RSS feed, but still nothing gets tracked.
Not sure what’s happening there, but will be glad to take a look if you would like. Feel free to contact me and we’ll get it sorted.
I’m getting:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/davidja/public_html/wp-content/plugins/simple-feed-stats/simple-feed-stats.php on line 527
Through line 635
Any ideas?
I probably forgot to convert the resource to a string, will get it fixed up on the next update.
Jeff what would be your thoughts on showing a way to switch from feedburner without losing any subscribers. Or minimizing the loss of subscribers.
Would love to hear your thoughts on that.
As mentioned it’s difficult to replicate FB tracking because their process/algorithms aren’t available. I’ve read there are some decent paid services that would probably approach the same FB numbers, but what’s the point when it’s just another 3rd party crutch. I think it would be better to let people track their own feeds and own their own data, which is the goal of the SFS plugin.
Minimizing negative impact is more do-able in that you can begin a feed awareness campaign whereby you “notify” and “remind” your feed subscribers that there will be a new feed URL that they’ll need to grab to stay current, etc. A few weeks or whatever repeating the feed-migration alert should help subscribers stay on board. This is why SFS includes a field for custom feed content :)