From 8c272d97c1371d984339e707bc57d2052eb3f20c Mon Sep 17 00:00:00 2001 From: David Basalla Date: Tue, 29 Mar 2016 15:33:56 +0100 Subject: [PATCH] Re-start A/B/C test on 'Start now' buttons This commit reverts https://github.com/alphagov/smart-answers/pull/2337. We ran a multivariate test for 'start now' buttons on 3 start pages in early March 2016. We want to run the test again to increase our confidence that the improvement trends shown in the original test are valid, with the same options winning and with a similar scale if difference. --- app/assets/javascripts/smart-answers.js | 2 + .../javascripts/start-now-button-abc-tests.js | 45 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 app/assets/javascripts/start-now-button-abc-tests.js diff --git a/app/assets/javascripts/smart-answers.js b/app/assets/javascripts/smart-answers.js index ddf380dcbd3..bee56d59c0d 100644 --- a/app/assets/javascripts/smart-answers.js +++ b/app/assets/javascripts/smart-answers.js @@ -1,3 +1,5 @@ +//= require start-now-button-abc-tests + function browserSupportsHtml5HistoryApi() { return !! (history && history.replaceState && history.pushState); } diff --git a/app/assets/javascripts/start-now-button-abc-tests.js b/app/assets/javascripts/start-now-button-abc-tests.js new file mode 100644 index 00000000000..a049c915b0b --- /dev/null +++ b/app/assets/javascripts/start-now-button-abc-tests.js @@ -0,0 +1,45 @@ +//= require govuk/multivariate-test + +$(function(){ + if(window.location.href.indexOf("/overseas-passports") > -1) { + new GOVUK.MultivariateTest({ + el: '.get-started a', + name: 'startButton_osPassport_201602', + customDimensionIndex: 13, + contentExperimentId: 'egf8SiUzQJmsUuEIbxkCRw', + cohorts: { + original: { callback: function() {}, variantId: 0 }, + getApplicationInfo: { html: 'Get application information', variantId: 1 }, + next: { html: 'Next', variantId: 2 } + } + }); + } + + if(window.location.href.indexOf("/calculate-your-child-maintenance") > -1) { + new GOVUK.MultivariateTest({ + el: '.get-started a', + name: 'startButton_calcChildM_201602', + customDimensionIndex: 13, + contentExperimentId: 'u0MzUmYRRzmb5mchoGp9Fw', + cohorts: { + original: { callback: function() {}, variantId: 0 }, + calculate: { html: 'Calculate', variantId: 1 }, + estimateChildMaintenance: { html: 'Estimate your child maintenance', variantId: 2 } + } + }); + } + + if(window.location.href.indexOf("/marriage-abroad") > -1) { + new GOVUK.MultivariateTest({ + el: '.get-started a', + name: 'startButton_marriageAbroad_201602', + customDimensionIndex: 13, + contentExperimentId: 'Xk_FTKgiTwikoIH0fzPklw', + cohorts: { + original: { callback: function() {}, variantId: 0 }, + findOutHow: { html: 'Find out how', variantId: 1 }, + getMoreInfo: { html: 'Get more information', variantId: 2 } + } + }); + } +});