Forum Moderators: open
I am doing some testing on a site, and I would like to run some traffic through 2 versions of the same page, with different layout and formatting to test conversion.
How can I use one link that will give me a 50/50% split in traffic (or some other percentage)?
Do you get what I am trying to do here?
Any help would be greatly appreciated!
In your <head></head> area insert the following...
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function go_to(url) {
window.location=url;
}
function rand_link() {
var a;
a = 1+Math.round(Math.random()*3); // a = random number between 1-3
if (a==1) go_to("http://www.example.com");
if (a==2) go_to("http://www.example.com");
if (a==3) go_to("http://www.example.com");
}
// End -->
</SCRIPT>
Then place the following code where you would like the random link to be placed...
<FORM NAME="myForm">
<INPUT TYPE="button" NAME="myButton" VALUE="link"
onClick="rand_link()">
</FORM>
That code actualy uses a button to work as the link.
Mack.