So after several hours of coding, I managed to integrate Google Maps into my sidebar to display the locations of visitors to this site (seen in the sidebar above the SMS area). In that time I was able to learn how to build KML files, integrate it into a Google API class and all sort of neat tricks. There are just a few little problems with the end result …
I can’t relelase it.
Well … that’s an incomplete statement. I can’t release it without re-writing how it operates to eliminate it’s dependance on a particular init call.
It seems that in order to make this plugin work, I need to have my body tag look like this: <body onload=”onLoad()”>
While this isn’t a big thing, per se, I can’t expect users will want to open up their theme’s header.php file to update this tag accordingly. I know that it’s possible to integrate Google Maps into sites without this, but I just haven’t discovered how. Such is the price we pay for writing code in .NET for several years.
The primary reason I wanted to write a plugin like this was because I haven’t been happy with the visitor maps that have been available online. They all want to call other sites and many of them are either quite slow to load or just plain suck. By using Google Maps with a specific KML file, the appearance can be controlled and customized as a user sees fit.
One of the things I liked about the Google Analytics reports was the Geomap Overlay. However, after comparing data for a set period, I was unable to validate the information shown. If I had this problem when creating reports at work, I would need to go line by line into the data and determine why my results were different. While Google Analytics can make lots of data look pretty, it can’t give me the detail that I require (raw IP address logs) to be confident in the data.
Another benefit to pulling this functionality server-side is the potential linking it to Omry Yadan’s FireStats. I’ve used this software for a while now and I really like the simplicity of the reporting, as well as the ability to filter the user agents and IP addresses that I feel are bots. I’ve also found that this reporting tool comes the closest to the raw access logs provided by my web host. I can only think of a few features I’d like to add to this excellent software, and this geomap overlay is one of them. (The ability to have a custom name appear for known IP addresses would be nice, too). Once I have the kinks worked out for the home screen, I can then work on integrating it with FireStats.
All this said, there are still a bunch of things that I would want to write into this GeoLocation plugin before releasing it to the public. We’ll need a way to filter out IPs and user agents of bots, and I’d like to give visitors the option to see the map in a larger window (if they’re really curious about demographics). Site owners should also have the option to display hit information if they want or not (it looks really bad on there, right now), as well as control the look of the pins.
I tend to have a habit of scope gallop when writing software that I will find personally useful, so hopefully I can make it useful for others, too. Is this something that others would potentially want on their site? Should I even worry about making this available or ensuring it will work on something other than WordPress 1.5 to 2.1.x ?















































No comments yet.