Separate Feed Stats with AWStats
A bit more than a month ago I was listening to a podcast between Jeremy Wright and Tyme talking about blog networks. During the conversation the topic of feed statistics came up. Jeremy astutely mentioned how most website statistics programs count a “feed check” (my term) as a page view. This certainly isn’t desirable. Why?
Many people with more time on their hands than me have their feed readers to check their feeds for new entries at ridiculous intervals… like five minutes. And more often than not the feed check takes place in the background on someone’s computer. It shouldn’t be considered a page view since the visitor is really just pinging you to see if there is anything new. The feed check might result in a page view and this is certainly a good goal.
So how should we keep track of “hits” to a feed? Personally I like to look at my feeds as a separate site. After all, wouldn’t it be nice to view how many times your feed is listed as a referrer to your actual content? Wouldn’t that be a nice conversion metric… to see how many times your feed converted into a page view? This works especially well if your feeds are summary and not full text feeds.
Viewing your feed statistics as a separate site will also allow you to see if other sites are referring people directly to your feed, what feed readers most people are using to double check compatibility, and how many unique feed readers you have among other statistics.
Okay, so how do we do this? Most statistics packages will allow you to exclude certain directories and or only include certain directories for your statistics. Here is how I have setup separate statistics for my sites using WordPress and AWStats.
Within AWStats you normally have one config file per domain. However we want to view our site essentially as two different sites so we will have two config files.
The first config file we will setup as our primary website config file and exclude the RSS feeds. For this we will use the SkipFiles directive in AWStats like this.
SkipFiles="REGEX[^\/feed]“
This code tells AWStats to ignore any line in the log file pertaining to any URI starting with www.example.com/feed*. Perfect.
Now for the other side. Setup a new config file with the same options however this time we will leave the SkipFiles directive as it was (blank) and instead use the OnlyFiles directive.
OnlyFiles="REGEX[^\/feed]“
Here we are telling AWStats to only process lines from the log file which have a URI starting with www.example.com/feed*.
Now setup your config files to process your statistics as you normally would. Presto! Two separate statistics pages separating your feed stats and your regular site statistics along with being able to track feed to pageview conversions!
Tim Flight is a feelance blogger, web-dev, web-hosting, PHP coder, and MySQL querier who is best known for his GPS reviews website.
Explore posts in the same categories: Web Tools, Website Development
November 4th, 2006 at 6:13 pm
Interesting stuff… i had the same problem with RSS news feeds. i was getting loads of hits!! then i realised most of them where by the same guy at 10 min intervals.