So I've been looking for a script that would display a user's city and state on my landing page and have been having some problems getting them to work. Either they don't display anything or display an inaccurate city and state.
I tried using the database on maxmind.com and I also tried using this script I found on tracking202's forums, but haven't been successful.
Can you guys recommend any simple free, or paid scripts that can get this done? Thanks.
Oh, by the way, what do you guys see when you run that script above? Is the city + state accurate? Does it even display the city/state?
I tried using the database on maxmind.com and I also tried using this script I found on tracking202's forums, but haven't been successful.
Code:
<script src="http://www.google.com/jsapi" type="text/javascript"></script><script type="text/javascript"><!--
if (typeof(google.loader.ClientLocation.address.city) != null) {
document.write(google.loader.ClientLocation.address.city
+", "
+google.loader.ClientLocation.address.region);
} else {
document.write("Walnut Creek, CA")
}
// --></script>
Can you guys recommend any simple free, or paid scripts that can get this done? Thanks.
Oh, by the way, what do you guys see when you run that script above? Is the city + state accurate? Does it even display the city/state?