Skip to content

Commit

Permalink
Merge pull request #2411 from alphagov/revert-2337-stop-abc-test-for-…
Browse files Browse the repository at this point in the history
…start-now-buttons

Re-start A/B/C test on 'Start now' buttons
  • Loading branch information
brenetic committed Mar 30, 2016
2 parents b322f5a + 8c272d9 commit c8994da
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/smart-answers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//= require start-now-button-abc-tests

function browserSupportsHtml5HistoryApi() {
return !! (history && history.replaceState && history.pushState);
}
Expand Down
45 changes: 45 additions & 0 deletions app/assets/javascripts/start-now-button-abc-tests.js
Original file line number Diff line number Diff line change
@@ -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 }
}
});
}
});

0 comments on commit c8994da

Please sign in to comment.