Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm looking to see what the "hot" pages are on one of my sites. I want to see for various timeframes, what the top-50 pages are. I'm only concerned with the current month's data.

I'm going to create a data feed with this info which will be input to another app. I have Apache logs, and complete control of the machine to install what I want. I'm mostly wondering if there's something out there already that I can use, or if I have to implement it myself, what good algorithms or strategies might be.

share|improve this question
    
Are you using a CMS of any kind? –  toomanyairmiles Apr 8 '12 at 9:17
    
My main site is Rails, which I built myself. I also use Wordpress. –  Dogweather Apr 8 '12 at 17:32
1  
Any kind of analytics program will work. You could even configure Apache to log into MySQL and just do a simple query to see which pages got the most hits between NOW() and DATE_SUB(NOW(), INTERVAL 6 WEEKS). –  Lèse majesté Apr 8 '12 at 19:57
    
@Lèsemajesté, That's a very interesting idea - from Apache directly into MySQL. I didn't know I could do that. And yes, this sounds simple enough for a SQL solution. –  Dogweather Apr 9 '12 at 7:34
1  
@Dogweather: Yep, it's doable. However, you do need to have edit access to the Apache configs, as it requries either mod_log_mysql or logtomysql to be enabled in the config file. –  Lèse majesté Apr 9 '12 at 7:38
add comment

3 Answers

up vote 3 down vote accepted

If you're using wordpress then there is the 'Google Analytics Popular Posts', which pretty much does what it says on the tin. 'SubZane Google Analytics Plugin' does the same thing, there is also a decent tutorial if you'd like to get your hands dirty.

Afraid I can't help with ROR, but this functionality should be available in one or more of the popular Ruby CMS frameworks.

share|improve this answer
add comment

You could just use Google Analytics to log the data, then pull the data out of the reporting api; this would save you a lot of hassle as most of the logging and data processing will be done for you by Google.

share|improve this answer
add comment

If your site is hosted on a server with cPanel (most hosters provide cPanel) there is a menu voice called Awstats.

Awstats auto reads your Apache access logs and convert them into easy to read statistics, and you don't even need to waste your time creatin a Google Analytics account and then adding the GA code to your site's pages.

If you have control on server, Awstats can be installed also by you without cPanel. But obvioulsy if you need to install it, it might be shorter to use Google Analytics.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.