Advertisement
Guest User

Popunder Split Testing Script

a guest
Jun 14th, 2016
12,136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <script>
  2. var totalURLWeight = 0,
  3. currentURL = 0,
  4. weighedURL = [],
  5. URLlist = [
  6. ["http://MyFreeCams.com", 10], // first column is URL, second column is the relative weight
  7. ["http://SlutRoulette.com", 70], // since the total weight is 100, this will happen 70% of the time
  8. ["http://ThePornSurvey.com", 10],
  9. ["http://ExposedWebcams.com", 10] // last element doesn't get a comma
  10. ];
  11.  
  12. for (var i = 0; i < URLlist.length; i++) {
  13. totalURLWeight += URLlist[i][1];
  14. }
  15.  
  16. while (currentURL < URLlist.length){
  17. for (i = 0; i < URLlist[currentURL][1]; i++) {
  18. weighedURL[weighedURL.length] = URLlist[currentURL][0]
  19. }
  20. currentURL++
  21. }
  22.  
  23. var pURL = weighedURL[Math.floor(Math.random() * weighedURL.length)];
  24. jsUnda(pURL, {
  25. width: 1100, // Width of the popunder
  26. height: 850, // Height of the popunder
  27. cap: 1, // Number of times the popunder can happen in the time period
  28. wait: (3600 * 72), // Time period delimiting the cap
  29. cookie: "CookieName" // Name of the cookie, change this to force the popunders to happen
  30. });
  31. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement