Jeremy Smith's blog

Entry Is Labelled

Preliminary Per-Site Blog Traffic Statistics

I've finished a first pass at setting up per-blog traffic statistics. If you notice, you can now go to http://blog.case.edu/your_blog/stats and get at your log files. The current week's log file will always be called access_log and will be rotated on Sundays. 4 weeks worth of logs will stick around in gzip'ed form located at access_log.YYYYMMDD.gz. So, now, anyone can have at it; download their statistics; and run whatever log analysis tools they would like. And, it's easy enough to cron a daily shop to grab it a la:

perl -MLWP::Simple -e 'get("http://blog.case.edu/jms18/stats/access_log");'

And, then, obviously, add in whatever other code you want to perform your analysis.

Of course, we've already done some pretty graphs for you using AWStats. To view your stats, you can use the URL form: http://blog.case.edu/stats/awstats.pl?config=your_blog.blog.case.edu. So, mine are at http://blog.case.edu/stats/awstats.pl?config=jms18.blog.case.edu. I plan on cleaning those URLs up via some mod_rewrite magic, so they end up looking like http://blog.case.edu/stats/your_blog, but I haven't done that yet.

I just got mod_log_sql installed and configured recently, so the stats start off on Sunday (when I got it completely running). Not much there right now, is what I am trying to say. But, that will obviously change as time goes on.

If you have any feedback, questions, or thunderous praise; leave a comment.

[Update: I have the mod_rewrite directives working. You can now use a URL of the form http://blog.case.edu/stats/your_blog_dir to access your blog's traffic statistics. So, for example, my stats are located at http://blog.case.edu/stats/jms18.]

Comments

  1. gravatar

    Well done Jeremy. We've been thinking about doing per blog stats for a while, but have not taken the plunge.

    The reason being is that we're not sure if it will discourage or encourage our users. A great deal of the reading of Warwick Blogs is done via our "show all" page at http://blogs.warwick.ac.uk/showall/newentries/, and with that, there is no way of knowing if someone has actually read your entry or just skimmed past.
    You'll have to let everyone know if you find that people who discover they have few/no readers give up blogging or don't mind.

  2. gravatar

    I tried to look up the stats but just got a whole lot of garbled text.

    Is this because I am using a MAC? I tried with both Safari and Explorer browsers.

    p.s. I just tried it out on a Windows machine and got the same result.

  3. gravatar

    I think my problem was that I was looking only at the log files. But the graphs came out very nicely. Great work!

  4. gravatar

    I looked at the statistic and was wondering what the distinction was between 'hits' and 'number of visits'.

    Also, what constitutes a 'page'?

  5. gravatar
    what the distinction was between 'hits' and 'number of visits'.

    Also, what constitutes a 'page'?

    AWStats has a glossary here – http://awstats.sourceforge.net/docs/awstats_glossary.html – that should explain the distinctions.

  6. gravatar

    In addition to my own blog (bcg8), I am a co-author for the KSL Reference Weblog (http://blog.case.edu/orgs/ksl/reference/). How can I view the stats for this group shared blog?

Post a comment