How to send users to random Affiliate links.
For those of you who use affiliate links and have access to direct deals, I have found and edited this html code which allows you to send your user to a random link. You must have a website to use this.
You can copy and paste this code into your website. You will then edit the websites to match your direct deal affiliate links.
You can add as many links as you want, just be sure to add more arrays.
Add the scripts at the beginning of the code and the end. Picture below.
The only things you should be editing is the "InsertURL" and adding arrays ie. arLink [1], arLink [2], arLink [3], arLink [4] etc.
Hope this helps someone!
var i;
var arLinks = new Array();
arLinks[0] = "InsertURL";
arLinks[1] = "InsertURL";
i = Math.floor( Math.random() * arLinks.length );
//Redirect
window.location = arLinks[i];
Comments
Fixed the HTML layout.