Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 4th Mar 2013, 02:07 AM   #1
Active Warrior
War Room Member
 
Join Date: 2011
Posts: 76
Thanks: 0
Thanked 4 Times in 4 Posts
Default
Setting up geo targeting in html files
Share on: 
fb share twitter share gplus share more share

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
gamez4you is offline  
Unread 4th Mar 2013, 04:48 AM   #2
ResponsiveDesignTest.Net
Registered Member
 
Michael71's Avatar
 
Join Date: 2011
Location: Rostock, Germany
Posts: 829
Thanks: 106
Thanked 225 Times in 194 Posts
Default
Re: Setting up geo targeting in html files
Share on: 
fb share twitter share gplus share more share

Can be done via jQuery...

HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
---
Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu
Michael71 is offline  
Unread 4th Mar 2013, 05:01 AM   #3
Active Warrior
War Room Member
 
Join Date: 2011
Posts: 76
Thanks: 0
Thanked 4 Times in 4 Posts
Default
Re: Setting up geo targeting in html files
Share on: 
fb share twitter share gplus share more share

Originally Posted by Michael71 View Post

Can be done via jQuery...
Can you elaborate please? example maybe?
gamez4you is offline  
Unread 4th Mar 2013, 05:11 AM   #4
ResponsiveDesignTest.Net
Registered Member
 
Michael71's Avatar
 
Join Date: 2011
Location: Rostock, Germany
Posts: 829
Thanks: 106
Thanked 225 Times in 194 Posts
Default
Re: Setting up geo targeting in html files
Share on: 
fb share twitter share gplus share more share

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';
}

HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
---
Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu
Michael71 is offline  
Unread 4th Mar 2013, 07:27 AM   #5
Active Warrior
War Room Member
 
Join Date: 2011
Posts: 76
Thanks: 0
Thanked 4 Times in 4 Posts
Default
Re: Setting up geo targeting in html files
Share on: 
fb share twitter share gplus share more share

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!
gamez4you is offline  
Unread 4th Mar 2013, 09:06 AM   #6
Web Developer
War Room Member
 
Andrew H's Avatar
 
Join Date: 2012
Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
Default
Re: Setting up geo targeting in html files
Share on: 
fb share twitter share gplus share more share

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

"You shouldn't come here and set yourself up as the resident wizard of oz."
Andrew H is offline  
Unread 4th Mar 2013, 03:06 PM   #7
ResponsiveDesignTest.Net
Registered Member
 
Michael71's Avatar
 
Join Date: 2011
Location: Rostock, Germany
Posts: 829
Thanks: 106
Thanked 225 Times in 194 Posts
Default
Re: Setting up geo targeting in html files
Share on: 
fb share twitter share gplus share more share

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

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


Bookmarks

Tags
files, geo, html, setting, targeting


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 09:24 AM.