{"id":195,"date":"2007-11-15T10:28:21","date_gmt":"2007-11-15T10:28:21","guid":{"rendered":"https:\/\/www.amitbhawani.com\/blog\/how-to-geotarget-adverts-free-guide\/"},"modified":"2009-08-21T06:20:38","modified_gmt":"2009-08-21T06:20:38","slug":"how-to-geotarget-adverts-free-guide","status":"publish","type":"post","link":"https:\/\/www.amitbhawani.com\/blog\/how-to-geotarget-adverts-free-guide\/","title":{"rendered":"How to GeoTarget Adverts on your website"},"content":{"rendered":"<p>There have been several times you were told by <a href=\"https:\/\/www.amitbhawani.com\/blog\/most-converting-pay-per-clickcpm-program\/\">pay per click companies<\/a> 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.<\/p>\n<p>Recently WidgetBucks announced that <a href=\"https:\/\/www.amitbhawani.com\/blog\/non-us-publishers-not-to-be-paid-widgetbucks\/\">Non US Publishers not to be paid WidgetBucks<\/a> and previously <a href=\"https:\/\/chitika.com\/mm_overview.php?refid=amitbhawani\" rel=\"nofollow\">chitika<\/a> and Yahoo publisher network also disapproved Non-US based traffic, which makes me sure you are looking for this kind of script.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.amitbhawani.com\/Images\/G\/geotargeting.jpg\" rel=\"lightbox\" title=\"Geo Targetting\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.amitbhawani.com\/Images\/G\/geotargeting.jpg\" alt=\"GeoTargetting Adverts\" \/><\/a><\/p>\n<p><strong>Installation :<\/strong><\/p>\n<p>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.<\/p>\n<p>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 .<\/p>\n<p>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 \u201cen\u201d, while Firefox and Internet Explorer report it as \u201cen-us\u201d. The More Restrictive version of the script will only show US ads to browsers reporting \u201cen-us\u201d- 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 \u201cen\u201d, 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\u2019t let me put php code into posts, so you will need to put &lt; ?php (without the space) at the beginning of the script and ?&gt; (without the space) at the end.<\/p>\n<p>More Restrictive:<\/p>\n<p>$language = $_SERVER[&#8216;HTTP_ACCEPT_LANGUAGE&#8217;];<br \/>\nif (substr($language,0,5)==&#8221;en-us&#8221;){<br \/>\ninclude &#8220;usads.txt&#8221;;<br \/>\n}<br \/>\nelse {<br \/>\ninclude &#8220;otherads.txt&#8221;;<br \/>\n}<\/p>\n<p>Less Restrictive:<\/p>\n<p>$language = $_SERVER[&#8216;HTTP_ACCEPT_LANGUAGE&#8217;];<br \/>\nif (substr($language,0,2)==&#8221;en&#8221;){<br \/>\ninclude &#8220;usads.txt&#8221;;<br \/>\n}<br \/>\nelse {<br \/>\ninclude &#8220;otherads.txt&#8221;;<br \/>\n}<\/p>\n<p>If you are using the WP-Cache plugin, you will need to mark the code as executable by enclosing it in \u2013mfunc tags: put &lt; !&#8211;mfunc&#8211;&gt;(without the space) at the beginning and &lt; !&#8211;\/mfunc&#8211;&gt;(without the space) at the end.<\/p>\n<p>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.<\/p>\n<p>Thanks to Neomeme for providing this excellent script.<\/p>\n<p>Another optional Script if the above one does not work out is <a href=\"http:\/\/www.websitepublisher.net\/article\/geotargetting-php\/\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":18012,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[586],"tags":[],"class_list":{"0":"post-195","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-make-money-online","8":"entry"},"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.amitbhawani.com\/blog\/wp-content\/uploads\/2010\/12\/geotargeting.jpg?fit=632%2C283&ssl=1","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":491,"url":"https:\/\/www.amitbhawani.com\/blog\/adsense-adwords-arbitrage-system-future\/","url_meta":{"origin":195,"position":0},"title":"Adsense Adwords Arbitrage System Future Information","author":"Amit Bhawani","date":"May 19, 2008","format":false,"excerpt":"Adsense Adwords Arbitrage : A money making idea which was a huge hit years back when adsense publishers used to generate millions of $ every month. Well this is not a trick or any idea using which you can scam the adsense team or get huge amount of clicks suddenly\u2026","rel":"","context":"In &quot;Adsense&quot;","block_context":{"text":"Adsense","link":"https:\/\/www.amitbhawani.com\/blog\/category\/adsense\/"},"img":{"alt_text":"Adsense Money Bag","src":"https:\/\/i0.wp.com\/www.amitbhawani.com\/Images\/M\/Money-Adsense-Bag.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":492,"url":"https:\/\/www.amitbhawani.com\/blog\/adsense-section-targeting-implementation-guide\/","url_meta":{"origin":195,"position":1},"title":"Adsense Section Targeting Implementation Guide","author":"Amit Bhawani","date":"May 20, 2008","format":false,"excerpt":"The very first question reading this post's title you would ask is what is Adsense Section targeting. The answer to this is that this feature allows you to suggest a small area on your website in order to point relevancy to your adsense ads. Generally you may have navigational links\u2026","rel":"","context":"In &quot;Adsense&quot;","block_context":{"text":"Adsense","link":"https:\/\/www.amitbhawani.com\/blog\/category\/adsense\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.amitbhawani.com\/blog\/wp-content\/uploads\/2010\/12\/Google-Adsense-Section-Targeting.jpg?fit=450%2C383&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":344,"url":"https:\/\/www.amitbhawani.com\/blog\/make-money-by-redirecting-google-images-traffic\/","url_meta":{"origin":195,"position":2},"title":"Make Money by Redirecting Google Images Traffic","author":"Amit Bhawani","date":"February 11, 2008","format":false,"excerpt":"I guess many of you guys have got some wallpaper gallery websites or would have added images in their posts\/content pages of your websites and you would be recieving good amount of traffic from google images. Well i do recieve traffic from google images which i need to monetise and\u2026","rel":"","context":"In &quot;Make Money Online&quot;","block_context":{"text":"Make Money Online","link":"https:\/\/www.amitbhawani.com\/blog\/category\/make-money-online\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":262,"url":"https:\/\/www.amitbhawani.com\/blog\/badoo-social-networking-community-joins-top100-sites-list\/","url_meta":{"origin":195,"position":3},"title":"Badoo Social Networking Community joins Top100 Sites List","author":"Amit Bhawani","date":"December 15, 2007","format":false,"excerpt":"A new online community which provides its members to communicate online at a local and global level. A Community with already over a billion members, badoo has recently become the most popular local community and is expanding in great speeds. The Features of becoming a member of Badoo includes the\u2026","rel":"","context":"In &quot;Tech News&quot;","block_context":{"text":"Tech News","link":"https:\/\/www.amitbhawani.com\/blog\/category\/tech-news\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":445,"url":"https:\/\/www.amitbhawani.com\/blog\/testing-is-important-in-adsense-for-maximizing-revenue\/","url_meta":{"origin":195,"position":4},"title":"Testing is Important in Adsense for Maximizing Revenue","author":"Amit Bhawani","date":"May 10, 2008","format":false,"excerpt":"The first thing which comes to your mind is whats the use of testing when we have already placed 3 Text ads and 3 Link ads which are the maximum allowed on a web page. We can obviously expect the maximum earnings but you may be wrong because Testing is\u2026","rel":"","context":"In &quot;Adsense&quot;","block_context":{"text":"Adsense","link":"https:\/\/www.amitbhawani.com\/blog\/category\/adsense\/"},"img":{"alt_text":"Adsense Full page ads","src":"https:\/\/i0.wp.com\/www.amitbhawani.com\/Images\/A\/adsense-ads-full-page.JPG?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":636,"url":"https:\/\/www.amitbhawani.com\/blog\/serious-adsense-ppc-tips-to-increase-your-adsense-revenue\/","url_meta":{"origin":195,"position":5},"title":"Serious Adsense PPC Tips to Increase your Adsense Revenue","author":"Amit Bhawani","date":"June 30, 2008","format":false,"excerpt":"Most of you guys get low paying clicks and you generally think that adsense pays very low per click but its not just a rule that adsense pays low and other pay per click programs pay you more. You need to try out some of these adsense tips and i\u2026","rel":"","context":"In &quot;Adsense&quot;","block_context":{"text":"Adsense","link":"https:\/\/www.amitbhawani.com\/blog\/category\/adsense\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":0,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/media\/18012"}],"wp:attachment":[{"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amitbhawani.com\/blog\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}