Redirects page base on user country

Hi guys, I’m struggling to find a good resource on how to execute this. I wanted to redirect the page base on user location. I know this required custom code but at the moment I’m stuck with it and most of the resources that I found are outdated. I’m using to determine the user country.

Here’s the code that I’m using :

$.get(“”, function(data) {
if( !== “GB”){
console.log(“no gb”)
}else {
var test
test = ‘GB’
console.log(“THIS IS GB”)}
}, “jsonp”);

But then I’m stuck on how to use those value and redirect the page.

If anyone have any experience on this please guide me :pray:t3:

@samliew sorry for calling you here, but do you have any advice on this ?

You already have the basic structure for conditions, so now all you gotta do is tell what page the user should go according to each location. Ex:


Redirects with JS

@syamsul.rozmey Do you have a working solution for this problem?