Geotargeting Tutorial

I have joined Google and none of the tools on eKstreme.com are official Google tools nor are they endorsed by Google. See this.

What is geotargeting?

Geotargeting, or geographical targeting, is a way for website to display content specific for a visitor's geographical location. This targeted content can be advertising, latest news, or other examples (more later).

Geotargeting happens on the server, before the page is sent to the browser. When a user requests a page from the server, the server queries the user's IP address against a database of worldwide IP addresses. The database identifies the country (sometimes even city!) of the user's IP address, and then the server decides what to do.

This tutorial will guide you through setting up everything you need for geotargeting on your website, including example code. And it will all be free!

Why is geotargeting important?

Geotargeting is important for many reasons which we can see with some examples.

Online advertising reaches everyone in the world that access a website. So if your website wants to run an advertising campaign targeted to one region only, you will need geotargeting. In this example, a certain advert will be shown only to people from certain countries, or different ad campaigns could be shown to visitors from different countries. This way, the adverts are highly targeted.

A related use is announcements. Suppose you are the author of a book and you're having book signing sessions in a certain country. Your website could then show an extra piece of content to visitors from that country loudly announcing that you will be signing books with them.

Another use of geotargeting is localization. Suppose your website has special offers for different countries around the world, say France, Germany, and the UK. When a visitor arrives to your website, you would like to show them the special offers relevant to them, and so you can target these offers to the visitor based on the country they are coming from.

So how do you do it? Read on...

Next page: Setting up the IP database.