What is the best approach to geo targeting?

Recently, geo-targeting has been very popular in technology. By IP, cell tower, GPS, using browsers, HTML5, mobile devices ...

Since I am going to add some geo-target features on our website, I would like to know which is the best approach. Is there some kind of API that uses a combination of all these technologies? Or at least which API / service would you recommend using?

The service I'm working on doesn't have to be 100% accurate, so I'm fine with geo-IP, but if there is an easy way to do better, why not.

Used technologies: php, javascript, ajax, java.

+6
php geolocation
source share
5 answers

No matter what you do, please do not set the language of your website based on the user's IP address, and then it is almost impossible to change if you do not know this language and you feel like spending hours (for example, ebay and paypal , among others, do). Use browser language.

Not all, say, France speaks or wants to speak French.

I suppose this is not very related to your question, but I felt the need to talk about it, sorry :)

+4
source share

GEO IP is probably the best approach.

HTML5 looks promising, but after a while it will be widely supported. And even then, this requires explicit user approval, which limits its use (for example, automatically redirecting to a specific version of a website)

+1
source share

To get started, try the free http://api.hostip.info?ip=xxxx (www.hostip.info for the website)

This will give you the city and country in the xml structure. I have a small proxy script file in PHP on an http server that the html page calls with ajax and displays the information in text and on a google map using geocoding google api. Later you can easily replace api.hostip.info with another api.

+1
source share

I would use the default IP address definition, and then possibly request a more specific location using the Javascript / HTML5 API navigator.geolocation . (E.g. iPhone Safari)

Most users still use devices that themselves don’t know the location, so plugins that are available will not get a better place than IP address discovery. (In addition, they will prompt users to manually enter data, which is annoying)

0
source share
Max mind is good. But if you are looking for a free solution, you might want to use javascript geocoder. In the end, they will support addresses and the country, but right now they give you latitude and longitude.
0
source share

All Articles