How to GeoTarget Adverts on your website

ADVERTISEMENTS

There have been several times you were told by pay per click companies that Non-US Based traffic wont be paid or will be paid much lower than US based traffic and this is the time you will need a GEOTarget adverts feature or a script on your website which can show ads based on the visitors country and this is called GeoTarget Adverts.

Recently WidgetBucks announced that Non US Publishers not to be paid WidgetBucks and previously chitika and Yahoo publisher network also disapproved Non-US based traffic, which makes me sure you are looking for this kind of script.

GeoTargetting Adverts

Installation :

There are two versions of the script, depending on whether you are more willing to accept false positives or false negatives. This is necessary due to the way different browsers report their language.

1. You will need to create two text files in the home directory of your server, usads.txt and otherads.txt . Paste in ad code you want to show to US visitors(ex. YPN) in usads.txt and paste in ad code you want to show international visitors(ex. AdSense) in otherads.txt .

2. Paste one of the following script versions to the place in your template where you want to insert ads. For US visitors the Safari and Opera browsers report their language only as “en”, while Firefox and Internet Explorer report it as “en-us”. The More Restrictive version of the script will only show US ads to browsers reporting “en-us”- thus, Safari and Opera visitors will only be shown International ads, regardless of location. However, you can be sure that no ads intended for US visitors are shown to international visitors. The Less Restrictive version shows US ads to any browser reporting “en”, so American users of all browsers will be shown ads intended for Americans- but so will anyone else in an English-speaking country, primarily Great Britain and Canada. Wordpress won’t let me put php code into posts, so you will need to put < ?php (without the space) at the beginning of the script and ?> (without the space) at the end.

More Restrictive:

$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
if (substr($language,0,5)==”en-us”){
include “usads.txt”;
}
else {
include “otherads.txt”;
}

Less Restrictive:

$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
if (substr($language,0,2)==”en”){
include “usads.txt”;
}
else {
include “otherads.txt”;
}

If you are using the WP-Cache plugin, you will need to mark the code as executable by enclosing it in –mfunc tags: put < !–mfunc–>(without the space) at the beginning and < !–/mfunc–>(without the space) at the end.

Because the ad code is included in a separate text file, and seamlessly written into the page upon execution, you are not modifying the actual ad code, and are thus fully compliant with their TOS.

Thanks to Neomeme for providing this excellent script.

Another optional Script if the above one does not work out is here

We will send you some more information related to How to GeoTarget Adverts on your website

2 Responses to “How to GeoTarget Adverts on your website”

  1. Thanx for the Tip Amit, will try it out.We might need it for WidgetBuscks.

    Venkat’s last blog post..Download ZoneAlarm Anti-Spyware for FREE

    Rate this:
    2.9
  2. thanks it will help a lot

    Rate this:
    2.5

Leave a Reply / Add Comments / Your Views

Related Posts worth Reading:



If you found this page useful, consider linking to it.
Simply copy and paste the code below into your web site (Ctrl+C to copy)
It will look like this: How to GeoTarget Adverts on your website



Interesting Posts Cloud of some of my Favorite Posts & Highest Commented Articles at AmitBhawani.com

Access Blocked Websites Smart Cards iPhone Update Digital Photo Prints Bsnl Evdo Adsense Tips Book 3G iPhone Send MMS best rapidshare search engine Laptops Security Wireless Memory Card Student Laptops Best Buy Laptops Gaming Laptops Wimax India Send SMS Send Free Fax Online Data Backup Commit Suicide Reliance Netconnect Bsnl Tariff Increase Broadband Speed Pnr Enquiry Recover Yahoo Mail Password Buy iPhone 5310 Toll Free Phone Numbers Google Jobs Bangalore Godaddy Coupons Report Online Fraud Free Seo Consultancy Airtel 8Mbps Nokia N99 Hero Honda Hunk Reliance Jewels Make Money at Home MacMod TV Tuner Cards Unlock iPhone 3G Trace IP Streaming Audio Fix Scratched CD Increase Laptop Battery PIC Pillar Articles Best Laptops DishTv Hyundai i10 Hyundai i20 Best Broadband Best Antivirus Unlocked iPhone Best Affiliate Programs Wireless Internet Lost Mobile Phone Tata Indicom Broadband Google Jobs Seo Meet