My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

ab-php

What is it?

ab-php is a no-frills AB testing framework for PHP developers.

How do I create a test?

<?php
require __DIR__.'/../ab.inc';
?>
HELLO
<a href="conversion.php">
<?php

  echo \Ab\Core\Container::createTest('Test 1')
            ->addTestVariation('foo', '<b>Foo!</b>')
            ->addTestVariation('bar', '<b>Bar!</b>')
            ->addTestVariation('baz',
                    \Ab\Core\Container::createTestVariationTemplate(
                            __DIR__.'/templates/baz.php',
                            array('value' => 'baz')))->render()
?>
</a>
?>

How do I setup a conversion?

<?php
require __DIR__.'/../ab.inc';
?>

<h1>Thank you!</h1>

<?php
    \Ab\Core\Container::createConversion('Test 1')->capture();
?>
Powered by Google Project Hosting