21 May 11 12:11 pm
Easy Way of Testing Different Affiliate Products
Not sure if this is of use to anyone else, but it solved a problem I was having when I was looking at split testing different affiliate products, so I thought I'd share it.
When a visitor hits the page with the script on, it chooses a URL at random, from a list you've included in the code, and then redirects the visitor off to that page. What it means is that I can send all my traffic to the 4 different affiliate products I want to test, quickly, simply, and automatically. It does choose the URL at random, so some offers will probably get more traffic than others, but over a couple of weeks I should be able to see the conversion rates for each of them, to decide which one of them should be getting all my traffic.
Here's a quick overview of how I set it up:
1 - Create a new .html file in my C-Panel File Manager that all my banners, images, and text links will point to
3 - Add the hoplinks for each of the products I want to test to the 'random URL' code
That's it - now all my traffic will be dished out to the different offers, allowing me to test and see which one converts best.
//Variable for random number.
//Array for links.
var arLinks = new Array();
//Change links to what you wish... and however many you want*...
// *Just be sure to increment the array element if you add more.
arLinks = "URL FOR HOPLINK 1";
arLinks = "URL FOR HOPLINK 2";
arLinks = "URL FOR HOPLINK 3";
arLinks = "URL FOR HOPLINK 4";
//Create random number, based on number of elements in array.
i = Math.floor( Math.random() * arLinks.length );
window.location = arLinks[i];
I think the code originated from http://castleamber.com/john/cgians.html
, just to give due credit.
P.S. - I also included an extra step for my website, with additional pages that mask my hoplinks, which is also pretty easy to do.