I'm currently using Google Experiments (previously: Google Website Optimizer) to do A/B testing for my site which runs on Joomla 1.5.
The problem is that that setup only works for testing specific articles/pages created in Joomla. I.e.: I create a variation page, get the URL and test it against the original URL in Google Experiments (that switches the layout of the original page to the variation automatically via a script in the HEAD of the original page).
What I want to do is A/B the frontpage. I've created a "new" frontpage, which has a different URL. But how can I add the Experiments script to just show up on the frontpage, and not all the pages of the site, when working with the index-page? If i add the script to the index.php file it will show up on all pages of my site.
I managed to solve this without using a plugin. Not saying the plugin PersianBoy67 posted wont work, but this is what worked for me. Inside the index.php file I added the following php code:
<?php if( JRequest::getCmd('view') == 'frontpage') { ?>
Google Analytics Experiments code goes here
<?php } ?>
That JRequest will echo "frontpage" if it's on the frontpage (and "article" if it's on an article), meaning that the Experiments code will only show when it's on the frontpage.