From 4aedd08f5bdefdf0be3462b8ef54e0e42ff30191 Mon Sep 17 00:00:00 2001 From: Anna Beddow Date: Tue, 7 May 2024 15:58:21 +0100 Subject: [PATCH] Create switch and test for onward journeys --- common/app/conf/switches/ABTestSwitches.scala | 10 +++++ .../common/modules/experiments/ab-tests.ts | 2 + .../experiments/tests/onward-journeys.ts | 37 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 static/src/javascripts/projects/common/modules/experiments/tests/onward-journeys.ts diff --git a/common/app/conf/switches/ABTestSwitches.scala b/common/app/conf/switches/ABTestSwitches.scala index 9d2220458d9..86be27621fd 100644 --- a/common/app/conf/switches/ABTestSwitches.scala +++ b/common/app/conf/switches/ABTestSwitches.scala @@ -54,4 +54,14 @@ trait ABTestSwitches { sellByDate = Some(LocalDate.of(2024, 5, 31)), exposeClientSide = true, ) + + Switch( + ABTests, + "ab-onward-journeys", + "Test click through rate when there is only one onward journey container shown.", + owners = Seq(Owner.withEmail("commercial.dev@theguardian.com")), + safeState = Off, + sellByDate = Some(LocalDate.of(2024, 6, 7)), + exposeClientSide = true, + ) } diff --git a/static/src/javascripts/projects/common/modules/experiments/ab-tests.ts b/static/src/javascripts/projects/common/modules/experiments/ab-tests.ts index 685fe4ceb08..a3f75435a59 100644 --- a/static/src/javascripts/projects/common/modules/experiments/ab-tests.ts +++ b/static/src/javascripts/projects/common/modules/experiments/ab-tests.ts @@ -1,5 +1,6 @@ import type { ABTest } from '@guardian/ab-core'; import { mpuWhenNoEpic } from './tests/mpu-when-no-epic'; +import { onwardJourneys } from "./tests/onward-journeys"; import { remoteRRHeaderLinksTest } from './tests/remote-header-test'; import { signInGateAlternativeWording } from './tests/sign-in-gate-alternative-wording'; import { signInGateMainControl } from './tests/sign-in-gate-main-control'; @@ -13,4 +14,5 @@ export const concurrentTests: readonly ABTest[] = [ signInGateAlternativeWording, remoteRRHeaderLinksTest, mpuWhenNoEpic, + onwardJourneys, ]; diff --git a/static/src/javascripts/projects/common/modules/experiments/tests/onward-journeys.ts b/static/src/javascripts/projects/common/modules/experiments/tests/onward-journeys.ts new file mode 100644 index 00000000000..30c4f64a4ef --- /dev/null +++ b/static/src/javascripts/projects/common/modules/experiments/tests/onward-journeys.ts @@ -0,0 +1,37 @@ +import type { ABTest } from '@guardian/ab-core'; + +export const onwardJourneys: ABTest = { + id: 'OnwardJourneys', + start: '2025-03-01', // update once test is ready to go live + expiry: '2025-12-01', // update once test is ready to go live + author: '@web-experience', + description: + 'Show the user one onward journey containers at a time to see which is the most effective', + audience: 25 / 100, + audienceOffset: 0, + audienceCriteria: 'all users', + dataLinkNames: 'OnwardJourneys', + idealOutcome: + 'Determine which combination of onward journey containers is the most effective', + showForSensitive: true, + canRun: () => true, + variants: [ + { + id: 'control', + test: (): void => {}, + }, + { + id: 'variant-1', + test: (): void => {}, + }, + { + id: 'variant-2', + test: (): void => {}, + }, + { + id: 'variant-3', + test: (): void => {}, + }, + ], + successMeasure: '', +};