Here is a live demo showing your own information.
<a href="http://visitorjs.herokuapp.com/" rel="nofollow">http://visitorjs.herokuapp.com/</a><p>Fyi: I am not storing the information.
Damn, you beat me to it. After I saw the original visitor.js was a paid service (which blew my mind), I started hacking together the JS implementations of most of the functionality I had laying around already.
The original visitor.js identified my city correctly; this only put me in the USA.<p>Is there a free reliable precise geolocation service that can take as many hits as a script like this could throw at it?
I don't think there are any ethical issues here. The paid service is doing something that was mostly, if not completely, available in other open source projects such as piwik and OWA in the first place. It's very educational to look at the differences in the way codejoust implemented his javascript vs. these other projects, and very convenient that you don't have to dig through a gigantor open source code base to do it.
I don't understand the pricing model behind visitorjs, and we had to implement a similar solution at my company. But the fact is - they created something and shared it here. If you think you can do a better job at it - fine, but why haven't you done it before, or at the very least named it differently. I don't mean to exaggerate, but it just doesn't feel ethical to me.
What are the ethical concerns about using this and storing the data? If I wanted to use this on my site, should I let visitors know, or is this data fair game to store? I rather not use the location data (or any of it) if there could be an issue.
I'm super impressed you turned this out so quickly. I think that really sums up the spirit in the HN community...<p>When you look at something that seems overpriced (or wrongly-priced) and you say "hey, I bet I could do this"<p>I still see value in potentially paying for a service like this when it's a big enough pain-point. But I really think they'd have had more traction with a open-source-to-paid model, where anyone can use the client-side code for free, but the extra stats and support provided are worth paying for.
Having a "first session" and "current session" exposes very interesting functionality. It suddenly provides a quick way to keep track of what search keywords they used to get to the site, and could be later linked to an account if later created.
location is either "null" or "err/google" for me all the time.<p>Although I am probably an edge-case, I'm tethering from an iPhone on Rogers in Canada.<p>Visitor.js (the paid service) correctly positions me in Toronto, Canada though.
Localization doesn't seem to work very well. I'm in Waterloo, Canada. This is what the script outputs for me:<p>> session.locale.country<p>"US"<p>> session.locale.location<p>undefined
i'm curious about the timing here.<p>did you see vistor.js hit HN and rewrite it in a few hours? or were you working on this in isolation and when you saw it on HN decided it was the perfect time to ship?