Randomising your web content

You may want to try out various permutations of your website content and then evaluate their performance in terms of click through / conversion rates. Here is one way of doing it.

To generate different (randomised) content – two versions in this case, but you can add as many as you want:

PHP Code

// get a random number in the range 0-1 (inclusive)
$pageVersion = rand(0,1);
// set the server side session variable
$_SESSION["PageVersion"] = $pageVersion;
if ($pageVersion == 0)
{
    $cSmarty->display('/index.tpl');
}
else
{
    $cSmarty->display('/index2.tpl');
}

Of course you may not want to have a completely different entire page, in which case simply drop in different content into various places on the page and then set appropriate session variables to allow the tracking.

When the final event takes place (such as the purchase or sign-up) all you have to do is inspect the session variable to work out which route they too.

echo $_SESSION["PageVersion"];

The above is all possible via your AdWords account, but there are times when it’s better to do your own thing and not let Google know everything about you.

Did you enjoy this post? Why not subscribe to our feed and get articles like this delivered automatically to your feed reader.

Comments

No comments yet.

Sorry, the comment form is closed at this time.