Variations apart from original is not showing in AB test report


(Ravi) #1

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
        }
    }]);

(Jason) #2

Hi Ravi,

Once the page has been viewed and your variation selected it will always show the same variation. Perhaps trying this in an incognito tab or different browser to see a different variation.

Thanks,