
Last week we worked on optimizing our HTML to increase the speed of downloads. This week we will be discussing techniques to do split testing. If you are doing advertising or a new site design then doing split testing can increase your conversions by finding the best solution for your own site visitors.
These are a few of the methods you can use to do split testing…
JavaScript Split Testing
<script type=â€text/javascriptâ€>
    var randomnumber = Math.random();
    if (randomnumber < .5){
        //version 1 of your code goes here
    } else {
        //version 2 of your code goes here
    }
</script>
PHP Split Testing
<?php $randomnumber = rand( 1, 100 ); ?>
<?php if( $randomnumber > 50 ){ ?>
<!– version 1 of your code goes here –>
<?php } else { ?>
<!– version 2 of your code goes here –>
<?php } ?>
You can also do split testing with ads on your WordPress blog using a plugin.
If you plan on doing a new site design or want to improve your conversion of your ads then some simple split testing will help you create the best choice for your site and visitors.
If you get stuck let me know in the comments.





Andrew. Lawyer.
August 17, 2008 3:30 pm
Great tips! Split testing can be really valuable for content, advertising, landing pages, etc. We should probably all be doing split testing more often.