We'll create fresh WordPress site with IP City Cluster installed. You have 20 minutes to test the plugin after that site we'll be deleted.
The IP City Cluster Plugin (IPCCP) generates a geographical cluster map based on where from people access you website (or to be precise: based on the IP they got from their provider). It requires a statistics plug-in (that keeps a database or logfile) which keeps track of the IP. Key features include a preview with a lightbox way of zooming, image maps for city names and hit counters for both the preview and zoomed image, template output, smart clustering and user control over color, sizes and such.
Some of you might be familiar with the ClustrMap Service. I signed up this month and was instantly hooked. After a week or two I had two issues though. One: why didn’t I sign up ealier (or how am I going to convince them to read my logfile)? Secondly you had to pay for the advanced service. Not my cup of tea (not to mention that you are always dependent on their service being up 😉 – I decided to look into writing my own cluster map WordPress plug-in. Key problem was of course the lookup of IPs. Fortunately MaxMind offers a free database and the required API to get City name, country name as well as longitude and latitude corresponding to an IP address.
See screenshots for an example.
All IPCCP options are accessible through the corresponding admin options panel. First of all make sure to enter the correct SQL table and key name (if it’s anything else than “IP”). There are three ways to generate a new picture:
– pressing Redraw in the admin panel
– calling an URL with the addition of ?recluster=true
– using the scheduling feature (which automatically generates the cluster map after a specified amount of time – or to be precise, it automatically generates the cluster map, by the next call IPCCP-call after the user specified time. But give the amount of spammers and bots that are crawling over public sites. this should be close the the specified time itself. Doesn’t it give you some satisfaction, that they are actually doing some good for you 🙂 Just be aware of the CPU time required for the generation before scheduling IPCCP too often (or adding your terabyte long logfile).
The new “all cities per cluster” feature is not supported by all browsers. actually it’s probably only supported by Safari (or Konquerer or the like) and probably it’s not correct (X)HTML either. But it sure looks cool when it works 🙂
[Update] It also works in IE7! Maybe it’s only Firefox that got trouble displaying multiline titles?
This WordPress plug is released under the GPL and is provided with absolutely no warranty (as if?). For support leave a comment and we’ll see what the community has to say.