VisitorMap plugin for ShortStat

VisitorMapThis is just a quick plugin for ShortStat that will put your visitors on a map using the Google Maps API. I wanted to get a quick visualization of where visitors were coming from, without having to add more scripts to my site from some of the other services that have come up lately (gVisit, MapStats).

VisitorMap uses the existing information that is already saved by ShortStat. It is meant to be a plug-n-play addition that doesn’t require any database or other changes. The only required change is in the file itself to set the Google API Key (free) for the folder you are installing it in to.

This is a quick and dirty release. Some of the data parsing I am doing could probably be done cleaner, but it works for being a late night “for fun” project… at least for now.

The data is provided by hostip.info which is a “Community GEO IP Project” (thanks to Randy for finding it). Basically it looks like they rely on visitors to state where IP’s are located. So to that end, it’s not a comprehensive list. When first testing the script, out of the 50 referers, only 18 had an entry in their database. But this is the only site we could find that was open and free, so if anyone has a better option (that doesn’t cost an arm and a leg… or even a toe) let me know. At the same time, because it is a free, open-source service… this may not be the best option for those with lots of traffic as they aren’t meant to be used for tons of hits.

Version 1.0 includes:

  • Uses ShortStat CSS for similar look and feel
  • Click on markers for more details (referer,page visited, date/time, browser/os, location)
  • Text list of visitors with links to open the marker “balloons”
  • Toggle between a small map with the above text links and a bigger map with no link list.

That’s about it… pretty simple as I said. But it works.

Please let me know what you think.

See it in action
Download the code

Thanks go out to Randy Hall at Code Dump for helping me test.

Comments

  1. June 12th, 2006 | 6:27 am

    Are you still working on this plugin?
    I get this error when I activate it :(
    I am running WordPress 1.5.1.2
    What am I doing wrong?
    Help me please!

  2. Aaron
    June 12th, 2006 | 8:02 am

    I don’t see the error you are getting in your post. Can you try posting it again?