chameleon-mvt
v2.30.0
Published
Multi-variant testing framework
Downloads
2
Readme
Chameleon MVT Framework?
This utility provides the ability to run MVT tests when Google Optimise may not be suitable.
It was created from the necessity to execute some code synchronously before other scripts have executed.
Confluence
Your first port of call would be to take a look at This confluence page HERE
There are many steps and the confluence page will guide you all the way through set-up to releasing your experiments.
How do I get set up?
- Create js file in src/mvts directory
- Configure mvt object
- Include your mvt in array of available mvts
- Activate via section parameter
Create js file in src/mvts directory
As a convention, name this file by the jira number e.g.
/src/mvts/JIRA-123.js
Configure mvt object
export default {
id: 'JIRA-123',
pageType: pageTypes.ARTICLE,
variants: [
{
traffic: 50,
code: function() {
window.console.log('original');
}
},
{
traffic: 50,
code: function() {
window.console.log('variant 1');
}
}
]
};
Include your mvt in /src/js/index.js
import JIRA123 from '../mvts/JIRA-123.js';
...
const availableTests = [JIRA123];
Activate via section parameter
feature.mvtTests.enable=true feature.mvtTests=["JIRA-123"]
When the MVT test is active, clients will be randomly segmented. The variant information will be stored in a cookie. This cookie name will be the the mvt id and the value will be the variant e.g. JIRA-123=1