@sravikant87 wrote:
I have created two different variations of my AB test and added script on my website page.
But while execution it shows only data for Original variation not for the two different variations created.
Below is my code snippet:_paq.push(['AbTesting::create', { name: 'BlueRed1', // you can also use '4' (ID of the experiment) to hide the name percentage: 100, includedTargets: [{"attribute":"url","inverted":"0","type":"equals_simple","value":"https:\/\/tyqa.epsilon.com\/v1\/cms\/thankyou\/ab\/indexab.page"}], excludedTargets: [], startDateTime: '2018/12/17 00:00:00 UTC', endDateTime: '2018/12/31 23:59:59 UTC', variations: [ { name: 'original', activate: function (event) { // usually nothing needs to be done here console.log('inside original variation changing text color to white'); document.getElementById('homepage-cart-banner-text').style.color = 'white'; document.getElementById('homepage-cart-banner-text').style.fontSize = 'small'; } }, { name: 'BlueButton', // you can also use '12' (ID of the variation) to hide the name percentage: 33, activate: function(event) { console.log('inside blue variation changing text color to blue'); document.getElementById('homepage-cart-banner-text').style.color = 'blue'; document.getElementById('homepage-cart-banner-text').style.fontSize = 'medium'; } }, { name: 'GreenButton', // you can also use '13' (ID of the variation) to hide the name percentage: 33, activate: function(event) { console.log('inside green variation changing text color to green'); document.getElementById('homepage-cart-banner-text').style.color = 'green'; document.getElementById('homepage-cart-banner-text').style.fontSize = 'large'; } } ], trigger: function () { console.log('inside trigger'); return true; // here you can further customize which of your visitors will participate in this experiment } }]);
Posts: 1
Participants: 1