Forums/Tips & Tricks

Example: Redirect visitors to the most relevant reseller based on their location, without having to ask for it.

Dennis van der Heijden Nov 08, 2009

For the redirect to work fast (before the page loads you need to place it in the head. We alway recommend to place a zone in the head, right under <head> so that for any reason in the future you do not need to add any more code to your site that you not already have,

Step 1: place zone in the head

make a new zone and past the code in the between <head> and </head>

Step 2: create inventory in reedge

Create a inventory item that says:

<HEAD>
<SCRIPT language="JavaScript">
<!--
window.location="http://someplace.com.mx";
//-->
</SCRIPT>
</HEAD>

Step 3: create an action

You can make a segment is your going to use it more often, otherwise just make a action directly.

We want to redirect all Mexican users by default to our Mexican site. So we call the 'entity: country' and make sure it equals 'Mexico'. That way all visitors from Mexico are not going to http://someplace.com but to http://someplace.com.mx.

Note

We recommend to do this only once per session, some visitors really want your US site.