Geotargeting Tutorial
What is geotargeting?
Geotargeting, or geographical targeting, is a way for website to display content specific for a 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, and now, we'll talk about two examples.
Internet marketing
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.
Localization
Another use of geotargeting is localization. Suppose your website is written in two languages, say English and German. By default, the English version is served. However, if a visitor comes from Germany (or any other German-speaking country), your website could send the German copy by default.
Next page: Setting up the IP database.
