You're browsing: KeithJamesLock.com » Blogging, Make Money Online, Online Business » Blog article: Wordpress Geo Targeting Script
Bookmark and Share

WordPress Geo Targeting Script

NEW: Free Install! <-- Don't feel like installing it yourself? I'll take care of it for you :) Contact me here or see if I'm online (Skype)

This is for all the marketers out there with niche blogs and web sites. My WordPress (and php-based web site) Geo-Targeting Script... Get it now

This script will let you show unique content based on the country your blog visitor is browsing from!

Let's run through an example...

A common use of the script is to show different ads in the sidebar/footer/header (or in a post/page) based on the person's country. 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 script, 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 and run some simple commands 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 script is 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. The cost of the script (which includes the guides) is just $9.97. I added it to the PayLoadz store and it is setup to auto-deliver to you immediately after payment. You can use this direct instant download link to make the purchase or else purchase it from the product page in the PayLoadz store.

Related posts:

  1. Create A Review Site Using WordPress
  2. 3 WordPress Review Site Types, With Examples
  3. What Keyword Are You Targeting? Want Some Help?
  4. WordPress Themes Free Collection
  5. Free Professional WordPress Installation Service

Bookmark and Share

© Earn a living online in your pj's

Share this post:
http://keithjameslock.com/wp-content/plugins/sociofluid/images/digg_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/reddit_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/delicious_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/technorati_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/google_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/myspace_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/facebook_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/yahoobuzz_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/sphinn_48.png http://keithjameslock.com/wp-content/plugins/sociofluid/images/mixx_48.png

If you enjoyed this post, make sure you subscribe to my RSS feed!

, , , , , ,

 

Enter your first name and email address below to receive exclusive money making tips.
First Name:
Your Email:
Spam protection; double opt-in:
Using AWeber Autoresponder


33 Responses to “WordPress Geo Targeting Script”

  1. alan Says:

    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

  2. Keith James Lock Says:

    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!

  3. Rachel Says:

    Do you have any idea if this script could be integrated into a Drupal website?
    Thanks,
    Rachel

  4. Keith James Lock Says:

    @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.

  5. plienine Says:

    What about e107 CMS?
    is it possible to add this function to e107 system pages?

    Thank You.

  6. Keith James Lock Says:

    @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.

  7. Joe Says:

    Hi,
    This looks perfect. Nice script!
    Has it been tested on WP 2.9.1?
    Does the price include future updates?
    Thanks
    Joe

  8. Keith James Lock Says:

    @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.

  9. Andy Says:

    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

  10. Keith James Lock Says:

    Hi Andy,

    The database comes from MaxMind. It updates monthly.

  11. Tom Says:

    Keith, is this easy to use for amazon links within posts? What’s the syntax for inserting alternative links depending on the country?

  12. Keith James Lock Says:

    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.

  13. Daniel Jacobs Says:

    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

  14. Keith James Lock Says:

    @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 :)

  15. Daniel Jacobs Says:

    Thanks for the quick reply. Do you know if it plays nicely with WP-SuperCache?

  16. Keith James Lock Says:

    @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!

  17. Daniel Jacobs Says:

    That sounds fair. I appreciate your honesty!

  18. Daniel Jacobs Says:

    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).

  19. Keith James Lock Says:

    @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..

  20. Daniel Jacobs Says:

    Yeah, it looks like the proxy strips out the ad scripts. It should show Adsense for Canada now.

  21. Keith James Lock Says:

    @Daniel… k, I refreshed it and I see a 300×250 AdSense block from here in Canada :)

  22. Daniel Jacobs Says:

    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?

  23. Keith James Lock Says:

    @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…

  24. Daniel Jacobs Says:

    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?

  25. Keith James Lock Says:

    @Daniel… ok… let’s come up with the solution by email then go from there.. I sent a couple already.. (maybe went to spam?)

  26. Daniel Jacobs Says:

    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!

  27. Joerg Says:

    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

  28. Keith James Lock Says:

    @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..

  29. Joerg Says:

    Hi,

    thanks for the quick reply!

    Now let’s wait and see if my potential client will become an actual client :)

  30. mobil bekas Says:

    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

  31. Keith James Lock Says:

    @mobil bekas

    Yes.. it can do that very easily :)

  32. TC Says:

    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?

  33. Keith James Lock Says:

    @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.


Leave a Reply