Updated: July 6th, 2011
Looking for geo targeting capabilities for WordPress and other PHP-based sites and Content Management Systems?
Check out the geo targeting scripts that we have available.
If you want to specify ads ( or other content ) to show to your web site visitors based on the city and/or region (state, province) and/or country they are visiting from, the Geo City Plus Package is for you. It includes BOTH the WordPress Geo City Plugin AND the Geo City PHP Script.
If you want to specify ads ( or other content ) to show to your web site visitors based on the country they are visiting from, the Geo Country Bundle is for you. It includes BOTH the WordPress Geo Country Plugin AND the Geo Country PHP Script.
If you want to simply show country specific messages, like “We deliver directly to {country-name}!” to your site visitors, this free geo targeting WP plugin will do the trick.
Let’s run through a quick example using the WordPress plugin ( or script ) from the Geo Country Bundle…
A common use of the geo country scripts is to show different ads ( or other content ) in posts, pages, widgets and / or theme files based on the person’s country. The content can be in the form of text, html, javascript and / or php <--- even in posts and pages! See how here.
For example, say you are running an “acai berry” blog or site. You may have an offer / creative for the U.S. only which pays $37.00. You may also have another offer that caters to Canada, the U.S. and the U.K. which pays only $34.00. Before using this plugin, you may have opted for the second offer ( the $34.00 one ) so you didn’t miss out on the U.K. and Canadian traffic. However, the $3.00 extra you would get for the U.S. offer is very important to your bottom line, plus… what about all of the other countries visitors that may drop by? You can monetize that traffic as well with say… some Google AdSense.
So how do you display the correct offer to your visitor? Simple, you install the geo-targeting script ( or plugin ) and run some simple commands when using the script ( or use WordPress shortcodes when using the plugin ) to decide which ads to display. In English you’d say “If this visitor is from the U.S., show the $37.00 offer, if they are from Canada or the U.K. show the $34.00 offer, and if they are from anywhere else, show Google AdSense!”
The plugin and script are both very easy to install and use on WordPress and other php based sites. I created a very thorough step-by-step quick-start guide as well to explain exactly how to use it, plus there are a variety of support avenues to get things going quickly.
Note: Some of the comments below might relate to prior versions of the geo targeting scripts. Please use the link above for the most recent information pertaining to our products.





















July 15, 2009 at 5:07 am
Is this easy to install even for someone with zero tech knowledge keith? i have just been accepted by neverblueads and copeac so may purchase this in the future as soon as i brush up on my CPA, looks good
July 15, 2009 at 10:32 am
Hey Alan, a couple people have followed the instructions and got things working pretty quickly. I give a lot of theory, background and example in the manual, but really the necessary instructions are quick and painless.
Awesome about NeverBlue and Copeac!
September 24, 2009 at 11:07 pm
Do you have any idea if this script could be integrated into a Drupal website?
Thanks,
Rachel
October 3, 2009 at 9:01 am
@Everyone, just to let you know, the script should work with any php based site, but the instructions are geared towards WordPress.
Rachel is currently testing it with Drupal and may provide instructions for others to use.. I’ll keep you posted in this spot.
January 9, 2010 at 4:40 pm
What about e107 CMS?
is it possible to add this function to e107 system pages?
Thank You.
January 9, 2010 at 6:51 pm
@plienine I never heard of that CMS… but I just Googled it.. it runs on PHP so yeah there will be a way to get it to work… full refund if not. I can try and help too if you need some assistance.
January 29, 2010 at 8:07 pm
Hi,
This looks perfect. Nice script!
Has it been tested on WP 2.9.1?
Does the price include future updates?
Thanks
Joe
January 29, 2010 at 8:20 pm
@Joe, Yep it works in the latest version of WP… it more or less “integrates” with any PHP 5.0 based site, any version of WP included.
There’s nothing formal in place to keep track of customer purchases to offer upgrades to, but I will be putting something more concrete together as time allows. I will, however, put your purchase notification email aside and send you an email when an update is made.
March 11, 2010 at 9:52 am
Hi,
What database does this use to perform the geolocation? Is there download/installation of the database required too?
Finally, how is the geolocation information updated, since location of IPs change constantly?
Many thanks
March 11, 2010 at 8:38 pm
Hi Andy,
The database comes from MaxMind. It updates monthly.
March 16, 2010 at 11:08 am
Keith, is this easy to use for amazon links within posts? What’s the syntax for inserting alternative links depending on the country?
March 16, 2010 at 8:46 pm
Hi Tom,
It’s simple for adding any kind of links, including Amazon links..
As far as inserting into posts you might have to get creative. One simple solution is to disable the Rich Text editor and install a plugin to allow PHP to execute. http://wordpress.org/extend/plugins/exec-php/
Then you just use PHP if/then or switch statements from there.
This might not make sense now but it will after reading the accompanying manual… but be sure to re-declare the $COUNTRY variable within the post to get it to work.
Also, if using the same bit of code in multiple posts, include statements work well.
Any of these extras I can help you with if need be.
April 8, 2010 at 11:48 am
Hello.
I have a site that generates about 30K page views per day. Do you see any performance impact after integrating your script? I desperately need this functionality, but not if it impacts performance.
Thanks,
Daniel
April 8, 2010 at 11:54 am
@Daniel – I have customers that have run smoothly with upwards of 50k+
The commands are short and quick and the code is clean and optimized. Anymore questions, let me know :)
April 8, 2010 at 12:01 pm
Thanks for the quick reply. Do you know if it plays nicely with WP-SuperCache?
April 8, 2010 at 12:11 pm
@Daniel… good question… I have not tested it with any caching software as of yet… Care to test for me? I will issue a 50% refund if it tests successfully.. and 100% if it doesn’t..
I have to also try W3 Total Cache but have just been soo busy…
Let me know!
April 8, 2010 at 12:12 pm
That sounds fair. I appreciate your honesty!
April 8, 2010 at 12:38 pm
Ok, I have the script installed and running. The trouble is, I’m in the US! Do you know anyone that can go to http://www.whatsthatbug.com/2010/02/12/update-we-are-doing-the-final-edits-on-our-book-this-weekend/ from outside the US or Canada? They should see an AdSense ad block below ‘are we experts yet?’. US or Canada should see a 468×60 banner (which won’t be an ad – just an image).
April 8, 2010 at 12:47 pm
@Daniel – can you set it to show AdSense for Canada too.. just for a sec.. then I can test it from here?
I went to http://au.worldproxy202.com/ to see what it might look like from Australia except it’s showing empty (which is possible when AdSense first gets dropped in)… so maybe a better test is to do what I described above..
April 8, 2010 at 12:55 pm
Yeah, it looks like the proxy strips out the ad scripts. It should show Adsense for Canada now.
April 8, 2010 at 12:56 pm
@Daniel… k, I refreshed it and I see a 300×250 AdSense block from here in Canada :)
April 8, 2010 at 12:59 pm
But unfortunately, so do I :( Which means WP-SuperCache cached your version first, and that’s what it showed to me. I wonder if we can work around this with a javascript function instead of php for the if/then statement? Any thoughts?
April 8, 2010 at 1:06 pm
@Daniel… oh.. so WP-SuperCache takes recently executed statements (just PHP??) and stores the result to load things quicker for the next visitor??? I didn’t know how it worked.. well…
off the top of my head I’m thinking maybe we could store the country value into a cookie..then use some javascript.. however.. maybe there’s code before that that will get cached?
Is there any way to force execution of certain code and ignore WP-SuperCache? let me check…
April 8, 2010 at 1:07 pm
Not exactly – it caches the entire page as a static html file. I’m going to poke through their docs. Should we take this conversation to email for a bit until we come up with something?
April 8, 2010 at 1:26 pm
@Daniel… ok… let’s come up with the solution by email then go from there.. I sent a couple already.. (maybe went to spam?)
April 8, 2010 at 2:29 pm
Thanks for your assistance, Keith. For anyone who wants this to work with WP-SuperCache, here is what you have to do:
Follow the regular installation instructions first.
Then, edit functions.php in your theme’s directory. You need to create a new function that has the if/then logic:
// checks the geolocation info to not serve pubaccess ads to the rest of the world
function geolocation_check() {
global $COUNTRY;
if ($COUNTRY == ‘US’) {
$ad_code = “enter your script info (make sure to escape quotes, i.e. \”).”;
} else {
$ad_code = “enter your other script info (make sure to escape quotes, i.e. \”).”;
}
echo $ad_code;
}
You can add multiple elsif calls if you need to.
And then in single.php (or wherever you want the ad to show up),
And now my blog shows one set of ads for the US and Canada, and another set for the rest of the world!
July 6, 2010 at 10:28 am
Hey Keith,
this looks like a perfect fit for me.
One question though: which version of the MaxMind database does your script use? To be more specific: do I have to pay any additional monthly amount to MaxMind, or are there no follow-up costs?
Thanks,
Joerg
July 6, 2010 at 10:36 am
@Joerg.. it’s the free version of the DB (99% accurate) from MaxMind.. no hidden fees :)
A customer sent me a file to automate the update process using a cron job.. let me know if you want it.. I haven’t used it myself and can’t provide support but it may be useful..
July 6, 2010 at 10:52 am
Hi,
thanks for the quick reply!
Now let’s wait and see if my potential client will become an actual client :)
July 20, 2010 at 4:05 am
Hi Keith.
Is your script capable of hiding Adsense ads based on site geographic visitors. I intend to display adsense ads to visitors from only particular countries and hide them from the rest.
Thanks
July 20, 2010 at 5:01 am
@mobil bekas
Yes.. it can do that very easily :)
July 24, 2010 at 1:07 pm
Hi Keith,
How about I want to use this plugin along with other plugin such as ad rotating plugin? Can it work? How do I write the php script?
July 24, 2010 at 1:11 pm
@TC.. It’ll work.. I used it just fine with WP Ads (ad rotator).. how to implement it is laid out in the accompanying manual. It’s really simple, but I’m here to help if you get confused with anything.. Also, there’s a money back guarantee if it doesn’t work for you.
November 9, 2010 at 9:05 am
Hi,
can this package be used, with minor changes, for the resolution of cities as well? I see that maxmind publishes a lite cities version as well
Thanks
November 9, 2010 at 11:47 am
Hello… I have version 2 coming (just need to write the manual and develop the site).. it allows you to display city and province/state as well. Will be available soon. Keep an eye on this spot.
November 17, 2010 at 9:58 am
Hello Keith,
I am intersted in your plugin for geo targeting ads for different countries. I would like to know a few things please:-
1) If I used this on a plain php built website what strain would it have on a free hosted server cpu load. The reason why I am asking this is I used a free open scource script that had geo targeting and my free hosting account got closed due to heavy socket requests from the script. So will this happen with your script if I have a heavily visited website. Will it be a strain on a free hosting server?
2) Are there instructions on how to impliment it on a plain php built site? I am looking for something that is light on hosting servers but gives good geotargeting for a heavy traffic site showing javascript based ads on a plain .php site.
3) Can I use it on more that 1 domain I own?
4) Will the new version be more expensive and when will it be released?
5) Is there a money back guarentee?
6) Will this work with the wordpress supper cache?
7) Does the server need anything for this to work like special php privliges like fopen or anything like that?
Thanks in advance for your help.
Webster
November 17, 2010 at 10:10 am
Hello
Sorry for the double comment. I forgot to ask also does your script slow the page loading time when it is goetageting the ads.
Thanks
November 17, 2010 at 12:48 pm
Hi Webster.. thanks for the questions..
1) The script is fast.. it retrieves data from a binary DB to determine the country and stores it in a variable… I can’t answer whether it will affect the CPU load on a free server as there are too many variables.. I have had no problems with speed on shared hosting accounts with Digg 1st page traffic..
2) Yes, it includes a manual for php sites, and another for WP
3) You can use it on all your domains.. you can’t sell it or give it a way, but you can sell or give a way a site with it installed without having to get your customer to pay for a license (that may change with the new version, it’s something we’re considering)
4) The new version will cost more and will be worth the price. It will be released early in the New Year at the latest…
5) Yep, you get the standard 90-day money back guarantee.. (it’s on the sales page)
6) With some tweaks it works with all caching plugins.. there are no instructions in the WP manual to assist with that.. that will be something included in the new version..
7) If you want to get it to run on PHP4 there may be some things that need to be turned on… but with PHP5 running it’s all good.
8) I have seen no difference in page load times when running the script… there certainly is nothing noticeable to the naked eye..
Hope that helps… just give it a try.. if for some reason it fails in any area above for you.. let me know and I’ll give you your money back.. have a good one
November 17, 2010 at 12:54 pm
Hi Keith thank you for your reply.
I am sorry for this but I have two more questions.
Can I pay with paypal?
Also if I bought your script will the future updates to that script be free of charge?
Thanks again for your help and sorry for any inconvenience caused.
Webster
November 17, 2010 at 12:57 pm
Can I also run many websites from one database or is it advisable to have a new database created for each new site or URL.
I am seriously thinking of purchasing.
Thanks
Webster
November 17, 2010 at 1:02 pm
Yep, PayPal (and any credit cards that PayPal accepts) is the only method of payment.. The next version will be on ClickBank.. I’m looking at the next one as a whole new product, so therefore no.. no free upgrades. I ran a test where I connected 10 moderately trafficked sites to the same DB (it’s a binary file, not MySQL) and things went smooth.. I don’t bother doing it that way under normal circumstances.. I like to just upload the files, add the include statement, run a command or two and be done with it… rather than adjusting connection strings etc.
November 17, 2010 at 1:05 pm
Do you have any idea on how much the new version will cost and what does the new version have that is better than the current version at $9.95 as now I do not know which to buy. Should I wait for the new version?
Thanks
Webster
November 17, 2010 at 1:15 pm
Not sure on the new price… we are still looking at data.. however.. we have determined that this current product was better priced at $24.95 rather than $9.95.. but we decided not to change it back because the new one is coming out soon. We are just testing it on some servers right now..
Say, your visitor is from Windsor, Ontario, Canada.. the program will return:
City: Windsor
Prov: Ontario
Country: CA or CAN or Canada (all in separate variables)
Also, in some cases it will return latitude and longitude.
Additionally, you can display a flag icon..
There will be a TON more usage examples.. and the manual will be smaller than the current one… and there will be an extended manual in the form of a blog that we add to as we go with more ideas..
So.. it depends what you need it for.. if you are content with just determining the 2-character country code of your visitors then this one is good enough for you.
December 21, 2010 at 4:51 am
Absolutely love the concept of this plugin. I’ll wait until the new version as I’ve got a great idea for the city option.
But a couple of quick questions:
Would I be able to run several instances of the geo on the same page? i.e. * 1 for the top banner to show by country.
* 1 to show a different side bar element (normal html) by country
* 1 to show some more html content based on UK city?
Also what would Googlebot see if I install plugin? Ideally I’d like to make sure they saw the content that is default (UK), whilst US humans see the human top banner, and sidebar navigation element.
Awesome stuff again Keith,
Lee
December 21, 2010 at 5:28 pm
Thanks Lee… I’m pretty excited about the launch. I will be relaunching a new version of the GEO Country API bundled with a Geo Country WP Plugin prior to the City API/Plugin but it won’t be far behind…
you wouldn’t really need to run multiple instances, but you can display as many custom geo-targeted “chunks” of data as you want on as many pages as you want… and it will be highly efficient too…
Googlebot would behave as a regular user in this case.. depending on the IP address of Googlebot during the crawl would determine it’s geo-location and therefore the content that it sees.. this shouldn’t be manipulated with code or else it would be seen as cloaking. However.. displaying IP-based content is perfectly OK as (what seems to me is) pointed out in this video by Matt Cutts (http://www.youtube.com/watch?v=GFf1gwr6HJw)
Obviously this may display less than ideal content in the SERPS for city-based content but it should be fine for countries… just set a nice descriptive (and generic) meta description to get around some of the issues with cities..
Don’t forget to set your main country in Webmaster Tools..
Hope that answers your questions!
Have a good holiday… Keith
December 22, 2010 at 5:05 am
Hi Keith,
That’s great thanks. I’ll keep an eye out for the new version.
I suppose what I could do is just have the standard UK outlinks and then just supplement it with the US/other nations above. I realised that the links I’d be switching were outbound affiliate ones blocked with robots.txt and rel=”nofollow” so it wouldn’t make a jot of difference to Google anyway – my bad!
Hopefully we’ll get a nice email via your newsletter letting us know when its available?
Thanks again and happy holidays,
Lee
January 7, 2011 at 3:37 pm
Hello Keith
I recently bought your script and I am thinking of purchasing the phpbay pro api script. I was told by the creator of that script a Mr Wade that I would need to subscript to maximinds geo targeting service where I will recieve a key to allow the phpbay pro api to become geo targeted. My question is can I use your script to geo target phpbay pro api script. If yes how is it done please.
Thank you in advance for your help.
January 7, 2011 at 3:49 pm
Hi Webster, I haven’t installed phpBay on any new sites in quite some time so I don’t know if there have been changes to it.. but the process described here used to work (probably still does) for geo-targeting phpBay. It’s pretty simple and straightforward..
but if you’d really like to get my geo script working in conjunction with phpBay, the quickest way (maybe not the most elegant) would be to use one of the free plugins that allows PHP code to be used in posts/pages.. (this usually means that you have to turn off the visual editor, however, there’s one plugin that claims you can keep that on..but I used it and I beg to differ).. anyway… you can do it that way..
.. my geo country WP plugin will actually make it easier because it uses shortcodes (like phpBay Pro) and you can just nest shortcodes… that’s due out soon but I have no exact time-frame as of when.. it’s ready now if you want to contact me about getting it privately, the documentation isn’t complete for it though.
January 7, 2011 at 5:09 pm
Hi Keith
Thank you for your reply. I am not using wordpress as my site is a good old fashioned php/html site hence I was thinking of getting the phpbay pro api. I just wanted to know if your script would work with a standard php website (flat file) and phpbay pro api script.
Thanks in advance.
January 7, 2011 at 5:13 pm
oh sorry about that, i missed the ‘api’ bit.. yep.. you shouldn’t have any issues.. if something comes up get a hold me of and we’ll figure it out. thanks!
February 2, 2011 at 10:16 pm
Hi,
I would like a little advice please. I thought I would ask here as it may help someone else who is trying to do what I am trying to acheive. I am not 100% great at php so sorry for asking this. What I would like to do is use your geo targeting script and block certain countries from entering my website. The code would be placed at the top of the page so it will be the first thing exacuted when someone visits my site. I have a java redirect but I just do not know the php code to use with that. What I would like to do is to list all of the countries that are accepted example “us”, “ca”, “au”, “ie” etc and the countries that are not listed would be redirected with my javascript to a site like yahoo or bing search. This would mean that if I ran a blog or forum and I was getting spam from a certain country then I could stop that spam by using your geo targeting script.
Thanks in advance for your help.
February 2, 2011 at 11:08 pm
Hey webby…
Thanks for the question ( and for the foresight of posting here to benefit others )
I launched a new site recently so you can get the script here now: http://geotargetingscripts.com/products/geo-country-bundle/ ( it’s actually a WP plugin as well as a PHP script )
For this scenario I would personally use the script even if you are on WordPress, although both would work fine.
Here are instructions on how to do redirection for both WP and PHP: http://geotargetingscripts.com/faqs/how-do-i-redirect-users-from-a-different-country/
Let me know if you have anymore questions.
Thanks again…
February 3, 2011 at 12:33 am
Thank you for the code :) I think there seams to be a little problem. If I put my country code into there like GB it redirects me to a different site. What I was wanting to do is to keep all visitor countries that are listed in the code and the ones that are not redirected to a different site. If I took GB out then I would not get redirected.
Thanks
February 3, 2011 at 12:39 am
Edit: I think I cracked it :)
I used this code and it worked.
Thanks
February 3, 2011 at 12:40 am
Code did not appear :(
February 3, 2011 at 12:43 am
@webby I’m really confused… First off, I don’t recall you buying the software.. secondly, I’m not sure what your issue is.. or if you have an issue…
February 3, 2011 at 12:45 am
@webby.. that code is for the new version.. if you happen to own the old one.. the variable names are different… if you own the old one, get a hold of me through the contact form and send me the receipt and I’ll get you the access to download the new one.
February 3, 2011 at 1:51 am
I did buy your software when you where selling the standard geo targeting script for $9.99 and I have managed to sort out the codes :) all is working well. I was going to post the code for the ‘old’ script but the code did not post. Thanks for the offer of the download. I will post you my receipt and order number.
February 3, 2011 at 9:31 am
@webby… I see… I hadn’t realized you were a previous customer. My apologies :)
February 19, 2011 at 11:44 am
I purchased the Geo country bundle script. It works on widgets but it is not working on the actual page. I entered the same shortcode but I don’t see anything.
February 19, 2011 at 1:28 pm
Please disregard the previous comment. The problem was with Amazon links that disappear in visual view. Do you happen to know how to solve this problem?
February 19, 2011 at 7:13 pm
Hi Nicole, I’m happy you sorted out the issue with the plugin… As for the Amazon links disappearing in Visual view.. hmmm… I’ve actually never encountered that.. they always just seemed to work for me because it’s really like any other link no? … but I do mostly work in Code view so I could be wrong.
You could use the PHP Include feature of the plugin to keep your Amazon HTML as-is. Here’s a post regarding the PHP include: http://geotargetingscripts.com/mini-tutorials/using-php-in-your-content-blocks/
Let me know if you need further help with that.
P.S. Although it’s fine that you posted your question here… there are plenty of support options on GeoTargetingScripts.com: http://geotargetingscripts.com/live-support/
July 2, 2011 at 2:25 am
Hey Keith,
Having just spent 40 minutes or so reading through the questions and replies, I have one question I may have missed reading all of them, which I would like to ask.
We are looking at targeting using a generic site with the word “local” in it, and wondered if there was any way of tightening down the amount of information which the geo tool provides, for example:
If the user is in (town)Cheltenham (county)Goucestershire (country)UK – can we just have the town and county displayed and take away the country?
In other words, if we wanted to do something based on “copy” like:
“We have a vet based in (town) who covers the whole of (county)?
Does this make sense to you? Hope so, and look forward to hearing your response.
Oh, we are using WordPress!
Darren
July 6, 2011 at 9:22 pm
Hi Darren,
As of today that is now available in our Geo City Plus Script/Plugin! Sorry for replying so late, I wanted to reply with good news, so here it is :) Let me know if you any questions along the way.