Setting up geo targeting in html files

6 replies
I have a html website. If I want to target my website to Germany alone, is there a code I need to implement in the files except from the WMT settings?

Thanks
#files #geo #html #setting #targeting
  • Profile picture of the author Michael71
    Can be done via jQuery...
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7811499].message }}
    • Profile picture of the author gamez4you
      Originally Posted by Michael71 View Post

      Can be done via jQuery...
      Can you elaborate please? example maybe?
      {{ DiscussionBoard.errors[7811529].message }}
  • Profile picture of the author Michael71
    Requirements:

    jQuery library

    Code:
    $.getJSON( "http://smart-ip.net/geoip-json?callback=?", function(data){
    		
    // traffic aus deutschland wird redirected, z.b. nach ...
    if (data.countryCode == "DE") { 
    window.location = 'http://yourdomain.com/de/index.html';
    } else {
    // traffic aus anderen ländern wird redirected, z.b. nach ...
    window.location = 'http://google.com';
    }
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7811553].message }}
    • Profile picture of the author gamez4you
      Originally Posted by Michael71 View Post

      Requirements:

      jQuery library

      Code:
      $.getJSON( "http://smart-ip.net/geoip-json?callback=?", function(data){
      		
      // traffic aus deutschland wird redirected, z.b. nach ...
      if (data.countryCode == "DE") { 
      window.location = 'http://yourdomain.com/de/index.html';
      } else {
      // traffic aus anderen ländern wird redirected, z.b. nach ...
      window.location = 'http://google.com';
      }

      Michael71, thank you for the example!
      {{ DiscussionBoard.errors[7811889].message }}
  • Profile picture of the author Andrew H
    It should be noted that this is more of a 'simple' solution. Bypassing this would be trivial for even the most basic of computer users (using a proxy, disabling JS in browser, etc).

    However, with that said their aren't really many effective solutions (Even with Netflix if you use an American proxy you get the full American show listing, which is the best!).
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[7812208].message }}
  • Profile picture of the author Michael71
    Yep, this is a simple and free solution.

    Ofcourse you could go with maxmind or similar... and mabye just route every proxy user to somewhere else
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7813593].message }}

Trending Topics