wpStats Update
posted under Wordpress 11.2.2007
I was having a little play with referer data from wpStats earlier, while I should have been writing my essay, and stumbled upon the comedy gold mine that is “the things people type into Google that lead them to my site”. Among my logs I found people who came here while searching for information on SMS.ac, “fuck the world”, and images of “middle east cars” to name but three. So I spent a few minutes writing up a module for wpStats that would show the most popular web and image search terms of users coming to the site from Google.

wpstats_googlequeries.jpgIt’s not bulletproof – I’ve used basic string functions rather than pattern matching with regexp (Note to self: learn regexp) – but it seems to work well enough. In the next few weeks I will try to find time to put together a release of wpStats that will include this along with various other enhancements as suggested to me over the last few months, along with a bit of a tidy-up. Consider this a call for suggestions – if you want your little tweak or widget included, let me know. Suggestions so far include a timezone setting to display times in your local zone and a rewriting of the bot-detection routines to use a table of patterns rather than an awkward list of string test functions. The comments in the code and general documentation also need a solid clean.

Anyway, no guarantees of when, but sometime soon with any luck. Failing that I’ll have lots of time over Easter to persue projects like this, so it should get done then if not before.


4 Comments
RSS feed for comments on this post | trackback
  1. ZappoMan wrote
     

    I just downloaded wpStats 2.1, and am just now playing around with it. Couple of things I noticed…

    1) I got some errors when the user agent was too long; I just hacked my mysql table to support agents longer than 30chars and the problem went away, I’m sure there’s a better solution than that.
    2) Love the search keywords feature… that’s a great idea.
    3) I would love to see some charts (like wordpress.com has).
    4) Have you played around with making it wpmu friendly? Seems to me that there isn’t really a need to have a separate country table for every blog.

    Thanks, and good luck!


  2. BigglesZX wrote
     

    Hey, thanks for your comment.

    The field lengths issue is a problem I’ve noticed for several fields (most notably the referrer field – limited to 255 characters so long queries to Google get truncated) – I will endeavour to correct this with a new DB schema in the next update.

    Charts is an interesting idea – perhaps something using RRDtool since many sites support that.

    Good point about the country table tho – I’ll see what can be done about that!


  3. john wrote
     

    Hi bud,

    first off, thanks for taking this over. I really hope you’ll have some time free to play with it in the future, as it’s a great tool.

    I hope this is the right place to ask, and if not, please feel free to delete and accept my apologies — I’ve just been googling for ages without finding a hint. I’m running 2.3.3 with wpStats 2.1 (2.11 actually but it seems to unpack as 2.1) and all works fine, except that all my hits are dated on what I suspect is the date I installed the plugin. It’s also the date on all the plugin file timestamps.

    Have you ever run into this before? It seems pretty bizarre; like I said, all the hit counts (and times of day) work fine, just not the actual date…


  4. BigglesZX wrote
     

    john,

    Sorry for the awfully delayed reply! I can’t say for certain what might be causing this issue – it’s not one I’ve come across before, so all I can really suggest is trying a re-install!

    I’m approaching my final term at Uni during which I should have a lot of free time to get the other aspects of my life on track – hopefully that will include doing some serious work on wpStats.

    Thanks for your comment, all the best.


Post a comment
You must be logged in to post a comment.