Created
March 20, 2012 22:03
-
-
Save underdown/2141741 to your computer and use it in GitHub Desktop.
Split test only new visitors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
setcookie("BTDT", "1", strtotime("+30 days")); | |
if(!$_COOKIE["BTDT"]) { | |
if($_GET["gclid"]) { | |
switch(rand(1,3)) { | |
case 1: header("location: /a/index.php");break; | |
case 2: header("location: /a/index2.php");break; | |
case 3: header("location: /a/index3.php");break; | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment