How To Geo-Target Ads based on visitors location
Today, I am going to tell how i implemented Geo-Targeting Ads based on visitors country. Let me first explain Why Geo-Target Ads and How you can implement it on your domain/site or your blog.

There are some advertising networks who only pay if the visitors are from a specific country say USA or Canada. I serve Axill CPM ads and ApplyAds CPM ads. ApplyAds CPM ads pays for impressions only if the visitor is from USA or Canada.
If i place a ApplyAds leaderboard CPM ad and if the visitor is not from USA or Canada, I will not earn for that Ad space.
What if i want to serve Axill CPM ads for non-US and non-Canada visitor and ApplyAds CPM ads for US and Canada visitor?
You could use the same method to Display Chitika Premium Ads only to US Visitors
Geo-Targeting ads based on visitors location (country,city)
The below steps provided are only for self-hosted blog and website/domain . You can skip the below and scroll down to find the steps for those who have their blogs on sub domain like a blog on blogspot.com
Implementing Geo-Target Ads on your domain/site:
MaxMind provides GeoLite Country database. Download and unpack Maxminds geoip database. It’s free and is updated every month. Using it, you can find out what country a visitor came from based on the IP address. They say it’s 97% accurate.
- Download the database and unzip (gunzip -d GeoIP.dat.gz on linux)
- Upload the database file to your site.
- Now you need API to query the database. MaxMind provides API in multiple languages so that you can use whichever you are comfortable with. Get the GeoIP API
I used PHP API to implement it on my site. You can pick and use any API with which you are comfortable and your hosting service is compatible.
The database is pretty big and if a returning visitor visits the site, the API queries the database again. To avoid redundant querying, you can store visitors countryCode in a cookie. This smart tip is provided at this site Geo target your visitors. I am also using it in this site
Implementing Geo-Target Ads on your blog hosted on blogspot.com or any other subdomain:
MaxMind also provides a javascript which is placed on one of their sites. They say the uptime for the Javascript service is about 99.95%. So, you can go ahead and use it without any doubt in mind.
- Use GeoIP Javascript Web Service.
- Copy the below code just after <body> tag
[lang='javascript'][/lang] - Place the following code where ever you want ads to appear based on visitors country
[lang='javascript'][/lang]
WidgetBucks and ShoppingAds are other advertising networks pay only for country specific visitors/traffic. You can go ahead, use it and see the difference.
This method will definitely increase revenue.
Any suggestions or doubts. Leave a comment.
IMPORTANT: This blog welcomes Guest Bloggers, Writers to also contribute by writing Guest Posts and also Make Money!. Check out our Revenue Sharing Program
Posted under: Blogging, How-To, Make Money Online, TipsNTricks|
1998 readers are already subscribed to this blog! Why don't you be one of them? Subscribe to this blog via your favorite RSS feed reader or by entering your email address on the form below: |




Subscribe
[...] has wrote a enthusiastic tutorial on how to geo-target your ads in your locate and decriminalize modify visitors from added countries. Lets verify for warning you [...]
[...] has wrote a great tutorial on how to geo-target your ads in your locate and monetize even visitors from added countries. Lets take for example you are using [...]
[...] has wrote a great tutorial on how to geo-target your ads in your locate and monetize even visitors from added countries. Lets take for example you are using [...]
[...] How to show Chitika Premium to US Visitors and eMinimalls to Non US Visitors Category: TipsNTricks, blogging In my previous post, I demonstrated How To Geo-Target Ads based on visitors location. [...]
Glad you liked the idea to use cookies to store the visitors location
//999tutorials.com
@Mattias, Yeah. i found your site long back. learned few things and wrote the post.
Glad to hear! You have a great site here too!
I would like to offer you to write guest posts at 999tutorials.com if you like. You get a paragraph where you can link and promote your site in the post if you like that. Send me an email if you are interested!
I find that click-thrus and conversions are increased with geo-targeting
@Keith, yes you are right. It helps getting good click through and converstions as well.