1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Random Pgae in percentage [explanation needed]

Discussion in 'Black Hat SEO' started by LGZACRO, Sep 24, 2013.

Tags:
  1. LGZACRO

    LGZACRO Newbie

    Joined:
    Aug 31, 2013
    Messages:
    17
    Likes Received:
    0
    Hello everyone, I am looking how to make that 30 percent of my "pictures.html" visitors would be redirected to page1.html, and 70 percent to page2.html?
    I have found thes:

    Code:
    <script type="text/javascript">
    (function(n){
     var pages = ['page1.htm', 'page2.htm', 'page3.htm'];
     n = n < 3? 0 : n < 8? 1 : 2;
     window.location.replace(pages[n]);
    })(Math.floor(Math.random() * 10));
    </script>
    but I am not sure I understand it right... can anyone explain this?