Click Precision Blog

Tips, techniques and news for marketing professionals.

By accepting you will be accessing a service provided by a third-party external to

1 minute reading time (231 words)

Geo Targeting Products

Geo Targeting Products

If you market products to a large geographical target, then you may be wondering how to show items based on the location of your users. The main problem is, this information is not shared by just looking at the visitor. At most, site owners get an IP address for the average user, unless this information is shared voluntarily, such as with a member account.

We decided to write a simple script and database solution for using Maxmind's GeoIP2 Precision Service with the City subscription. Queries are very cheap and flexible, so this is pretty simple to use if you have experience with PHP. This is set up for products, however if you're a little savvy, then you can also use it for categories, links or whatever you can dream about.

We recommend deleting IP addresses every several months, depending on the dependency needs you have - to refresh the data, since IP addresses get re-assigned often.

Naturally, a database is required for storing both the IP, city, country data - as well as a comma separated list of the states that you want to target for the product. It has been tested on PHP version 5.2x with mySql v5.6x on an Apache server. There is no reason to believe it will not work on all versions, with PHP >= 5.

5 PPC Tips You May be Overlooking
These Mistakes Will Kill Your PPC Campaign


No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Tuesday, 16 July 2024
If you'd like to register, please fill in the username, password and name fields.