This page explains how to setup Multivariate Testing on your PHP pages.
If you want to know more about Multivariate Testing, then click here to read this first.
Your page must be saved with the .php extension (to execute php code)
It must be saved on the same server (hosting) as your FunnelFlux installation (but it can be another domain name). Thus you cannot use the PHP version with the managed version.*
You must find the server path to your mvt.php file - it is located at your funnelflux root folder
/tracking/mvt.php-- if you are using our Vultr install procedure then your path will be
*For security reasons we can't enable remote calls to the PHP MVT processor from another server, and it would be slower than using JS anyway so is not worth it.
In your lander/offer page, you will add the following code above everything else:
mvt.php file is on the same server as the tracker, as is your lander, so on the back-end it handles communicating all MVT variation information to the FunnelFlux tracker, for the current user session.
Remember, this doesn't have to be on the same domain/virtual host -- as long as its on the same server, you can modify the path/to/ to find this file. E.g. you might have
Now, for adding variations...
Between the include and the Mvt::process(), you will then be able to create all your variations, such as:
Mvt::add('heading', 'Best Shoes Evaaarrr!');
Mvt::add('heading', '#1 Product');
Mvt::add('cta', 'Buy NOW!');
Mvt::add('cta', 'Get one NOW!');
Mvt::add('cta', 'Purchase a Pair NOW!');
Then, in your lander's HTML, anywhere you want to inject a variation, you can do it like this:
<?= Mvt::get('heading'); ?>
<?= Mvt::get('image'); ?>
'heading' and 'image' are just examples. You will use the keys that you have defined in your variations. The names for the keys are completely up to you.
By default, your visitors will ALWAYS see the same variations, no matter how many times they enter your funnel or refresh the page.
You can change this behavior by passing the following parameters to Mvt::process();
Mvt::process( [ 'randomness' => Mvt::RANDOMNESS_ALWAYS ] );
This will always show random variations. If your visitor refreshes the page, he will see new variations.
Mvt::process( [ 'randomness' => Mvt::RANDOMNESS_PER_ENTRANCE ] );
This will always show the same variations to your visitor when he refreshes the page. However, if he re-enters your funnel with your tracking link, new variations will be shown.
Mvt::process( [ 'randomness' => Mvt::RANDOMNESS_PER_UNIQUE_VISITOR ] );
This one is the default behavior. Your visitor will always see the same variations, no matter how many times they enter your funnel, or how many times they refresh the page.
In this situation, the
This can be accomplished by making a small adjustment to your PHP code
In your PHP code, alter the Mvt::process function to the following:
'randomness' => Mvt::RANDOMNESS_PER_UNIQUE_VISITOR,
'sendToJS' => true
Note that this will overrule any variations the JS itself generates, the two should not be used in tandem to generate MVT variations.
If present, the JS code will automatically use the variation information that the PHP has generated and output on the page.
When using MVT for a domain different than your tracking domain (but hosted on the same server), since cookies cannot be transferred from one domain to another, you must pass two additional parameters to your lander's url:
This needs to be done only when the lander's domain is different than the tracker's domain.