How to Display Visitor Location on Landing Page

This is a useful trick that many affiliates don’t use or don’t know how to use. It’s do-able with most modern affiliate tracking software. This has been proven to increase click-through rate and conversion rate when used properly.

How It’s Done

The plan is to capture the visitor’s location using the tracking platform, then pass that variable on to your landing page. This is done by asking the tracking software to forward the selected token to the landing page using extra code added to the end of the landing page URL like:

domain.com/landingpage.html?city={city}

In the case below, the tracking platform is BeMob but you can use most other tracking software to do the same. As you can see, the landing page URL contains the variable “?city=” at the end of it. The option “+city” is ticked in the available tokens section which tells the tracker to fill it in with the actual city of the visitor.

Next, two sets of JavaScript codes have to be added to the landing page in order to be able to display the token passed to it by the tracking platform.

First the following code must be added before the </head> tag:

<script>
function getURLParameter(name) {
var query = window.location.search.substring(1);
var vars = query.split(“&”);
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split(“=”);
if(pair[0] === name){return pair[1];}
}
return “”;
}
</script>

Finally, the following code must be added after the <body> tag to display the token replacing it with the value passed on by the tracker on the landing page:

<script>document.write(getURLParameter(‘city’))</script>

Note, city can be replaced by any other token that you may choose to pass on to your landing page. Other useful tokens include OS, Country, and could even include tokens passed on by the traffic source.

Results

I highly recommend that you play around with these tokens to see the results. Sometimes, it could make or break your campaign.

I’m currently running an adult dating campaign. I split-tested two versions of the same landing page with the city token enabled in the title and one without it.

Here is the result, the top line is the landing page with the city token included in the title area.

 

Leave a Reply

avatar
  Subscribe  
Notify of
Affletic