Tracking web site visitor locations with gvisit
Tim Finin, 4:44pm 20 August 2005We’ve added a service (link) that shows locations of recent visitors to our web site. You can get to by clicking on the ABOUT US link in the header of any page and then click on the link Recent web visitors on the navigation menu on the left
It’s fascinating to see the distribution and to zoom in and try to guess where each visitor is really from. Can you find your own tracks?
Here’s how I think it works, more or less. We put the required javascript code in the template that’s used for each EBWEB page that will ping the gvisit service for us. They show locations of the recent “unique” visitors. The javascript must get the visit’s IP address and send it to gvisit with our registered ID. Gvisit uses an IP geolocation database or service (e.g., IP2location) to get the visitor’s long/lat and string describing the location. For each registered site, once an hour, gvisit gets recent visitors with unique long/lats from it’s database (and maybe deleting them) and builds the XML to add to the google map using Google’s API.
How well does it work at localizing your visitors? If 50 visitors from different IP address all from UMBC’s campus access our web site, only one shows up, since all of us will be reduced to a single long/lat, which is in downtown Baltimore. I guess this is where we connect to the backbone. My home machine gets mapped to Arlington Virginia, presumably along with all 10,000 (est) Comcast broadband custmers in the greater Baltimore-DC area. A simple improvement to the gvisit service would be to keep a counter of the number of hits from a given long/lat, so I could see that, say 5 hits came from MIT, 43 from UMBC and 54 from Comcast.
I’ve noticed some mismatches getween the long/lat values and string names — e.g., a location in Maryland that’s said to be in Florida. I’ve also noted some locations that surely must be off the grid — like one at the northnmost bit of Norway. More noise, I’m guessing, but please, correct me if you are reading this and hail from there.


August 20th, 2005 at 10:59 pm
Very Interesting! Also, if a shop finds more people from some location visit their site, they may use the information for marketing activities in that area. Aha.