var whichRegion = 2; var theDomain = window.location.hostname; switchToUs = function(){ $.get('https://' + theDomain + '/includes/changeRegion.cfm?changeRegion=' + whichRegion, function(){ location.reload(); }) } if(!document.cookie.includes("geotargetly=redirected")){ console.log('geotargetly.com - geo redirect executed'); document.cookie = "geotargetly=redirected;path=/;"; (function(g,e,o,t,a,r,ge,tl,y){ t=g.getElementsByTagName(e)[0];y=g.createElement(e);y.async=true; var a=window,b=g.documentElement,c=g.getElementsByTagName('body')[0],w=a.innerWidth||b.clientWidth||c.clientWidth,h=a.innerHeight||b.clientHeight||c.clientHeight; y.src='https://g9706132415.co/gp?id=-MDIg_jmVimGWfBSwITG&refurl='+g.referrer+'&winurl='+encodeURIComponent(window.location)+'&cw='+w+'&ch='+h; t.parentNode.insertBefore(y,t); })(document,'script'); }else{ console.log('geotargetly.com - geo redirect not required'); }