There is a great deal of chatter lately regarding geo-targeting technology primarily in relation to setting up Google AdWords ads to only be shown to an audience in a certain radius. This has led to discussion for webmasters regarding how to geotarget ads on their own web pages, on their own sites. Many free and commercial solutions exist for various platforms.

Today I want to discuss a method that is not only free, but one that will work on a web site regardless of the technology used to develop the web site. What I mean by that is if the web site is plain HTML, or PHP, ASP, or any other markup or scripting language, this will work.

maxmind

Free, but with a catch of course

Naturally with “free” there is a small catch. The provider of the data used for the lookups, MaxMind, requires that an attribution link be placed on each web page that there is technology is used on. It doesn’t, however, specify where that links needs to be, so placing it in the footer of the pages is perfectly acceptable. Alternatively, paying $0.0004 per lookup will allow you to remove the attribution. A minimum of $20/month has to be spent, and the 2 million lookups each month do not carryover. Let’s look at the free route shall we?

It won’t work for everyone

This geo targeting solution uses JavaScript, so if a visitor to your web site has JavaScript disabled the location of that visitor will not be able to be determined on-the-fly. Finally, like all MaxMind geo-location products, it initiates the lookup based on IP Address, which isn’t the most accurate method that exists. A better approach would be to initiate the look-up by latitude and longitude, but there isn’t an easily obtainable free working solution for that that I am aware of.

Moving along

Here are the steps to follow to get geo targeting working on your web site:

1) Visit https://www.maxmind.com/ to signup for the service.

2) Include the appropriate JavaScript into your site which you will find here: http://dev.maxmind.com/geoip/javascript – You can pick from country lookup, or city lookup (which provides country and region as well).

3) Then call the appropriate functions to get the information you seek. For example, for the city (again, based on IP address) of the user you would output the results to the JavaScript function: geoip_city() All commands can be found here: http://dev.maxmind.com/geoip/javascript

What’s the use?

If your brain isn’t already flooding with potential uses for this technology, consider these ideas to get your creative juices flowing. As a producer of geo targeting technology for WordPress I initially launched the software to allow me to run CPA offers for Acai Berry free trials that were specific to a particular country. I can’t remember the exact numbers but for example, one offer for the US, Canada, and the UK paid $28, and a different one for the US paid $32.

Initially, I ran just the $28 offer so that I didn’t miss out on the traffic from Canada and the UK. But with my plugin (a mere script at the time), I was able to run both. I would detect the country, and if US I would show the $32 offer, and if Canada or the UK I would show the $28 offer, and if any other country I would show Google AdSense.

I also showed text sometimes with statements such as: “Also available in {country-name}!

You can use this technology to sell advertising on one page, but to every city in the world. Each city could have it’s own “sponsor” for just one page. You can also run a community, and have city-targeted comments. I did that using Facebook comments and modifying the URL in the comments code to reflect the location in the query string so that Facebook would show a new set of comments for each city, even though they were all on the same page. In fact, I combined the city ad sponsorship and city-based comments on the same page. Now, my friend, you can do that too, but for free.