4

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.

5
  • Are you using a CMS of any kind? Apr 8, 2012 at 9:17
  • My main site is Rails, which I built myself. I also use Wordpress.
    – Dogweather
    Apr 8, 2012 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). Apr 8, 2012 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, 2012 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. Apr 9, 2012 at 7:38

3 Answers 3

3

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.

3

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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