Hey all,
I wanted to post up a quick tip for you all, since I often hear people asking about how they can implement geo-location in their landing pages.
Alot of people recommend MaxMind or some other geoIP database, but really, thats a pain in the ass…there is a much easier way to do it.
On your landing page, just include the following in header.
<script type=”text/javascript” src=”http://www.google.com/jsapi”></script>
This script will calculate your visitors location for you….and all you have to do is pull the ClientLocation variable!
For example, if I wanted to display a popup with the users city:
alert(google.loader.ClientLocation['address']['city'])
Seriously, its THAT SIMPLE.
Have fun!

The Javascript is running at client side. How do you get to know the location from server side without posting back the data to server?
Its server side…..
I see your blog and i really impress your blog.
Wow! That’s so easy. I work for Auto Shipping Network and we ship cars all over the world, so this will definitly help us out.
Hi Rob, nice to meet you. Great post. We implemented an IP detect from a free DB but it’s still a pain to keep updated. Glad it was free
but I’m going to try this – way easier.
Thanks,
Jim Adams – CEO
New Homes Directory .com
Hey Jim,
Happy to help!