From 963679379f58877d626ff21a263f0da7b0d2f032 Mon Sep 17 00:00:00 2001 From: Simon Adcock Date: Thu, 16 Nov 2023 13:45:25 +0000 Subject: [PATCH 1/2] remove ads-in-merch ab test --- common/app/conf/switches/ABTestSwitches.scala | 10 ------ .../conf/switches/CommercialSwitches.scala | 11 +++++++ .../modules/analytics/shouldCaptureMetrics.ts | 2 -- .../common/modules/experiments/ab-tests.ts | 2 -- .../modules/experiments/tests/ads-in-merch.ts | 31 ------------------- 5 files changed, 11 insertions(+), 45 deletions(-) delete mode 100644 static/src/javascripts/projects/common/modules/experiments/tests/ads-in-merch.ts diff --git a/common/app/conf/switches/ABTestSwitches.scala b/common/app/conf/switches/ABTestSwitches.scala index 6b7d5e05842..d9cc3fa0a0a 100644 --- a/common/app/conf/switches/ABTestSwitches.scala +++ b/common/app/conf/switches/ABTestSwitches.scala @@ -55,16 +55,6 @@ trait ABTestSwitches { exposeClientSide = true, ) - Switch( - ABTests, - "ab-ads-in-merch", - "Test the commercial impact of showing adverts in merchandising-high and merchandising slots", - owners = Seq(Owner.withEmail("commercial.dev@theguardian.com")), - safeState = Off, - sellByDate = Some(LocalDate.of(2023, 11, 30)), - exposeClientSide = true, - ) - Switch( ABTests, "ab-elements-manager", diff --git a/common/app/conf/switches/CommercialSwitches.scala b/common/app/conf/switches/CommercialSwitches.scala index f1047d1ad55..e8cb410bde5 100644 --- a/common/app/conf/switches/CommercialSwitches.scala +++ b/common/app/conf/switches/CommercialSwitches.scala @@ -1,5 +1,6 @@ package conf.switches +import java.time.LocalDate import conf.switches.Expiry.never import conf.switches.Owner.group import conf.switches.SwitchGroup.{Commercial, CommercialPrebid, Membership} @@ -431,4 +432,14 @@ trait PrebidSwitches { sellByDate = never, exposeClientSide = true, ) + + val adsInMerch: Switch = Switch( + group = Commercial, + name = "ads-in-merch", + description = "Enable showing adverts in merchandising-high and merchandising slots", + owners = group(Commercial), + safeState = Off, + sellByDate = Some(LocalDate.of(2023, 12, 4)), + exposeClientSide = true, + ) } diff --git a/static/src/javascripts/projects/common/modules/analytics/shouldCaptureMetrics.ts b/static/src/javascripts/projects/common/modules/analytics/shouldCaptureMetrics.ts index 053266a6717..725f428401d 100644 --- a/static/src/javascripts/projects/common/modules/analytics/shouldCaptureMetrics.ts +++ b/static/src/javascripts/projects/common/modules/analytics/shouldCaptureMetrics.ts @@ -1,13 +1,11 @@ import type { ABTest } from '@guardian/ab-core'; import { getUrlVars } from 'lib/url'; import { isInABTestSynchronous } from '../experiments/ab'; -import { adsInMerch } from '../experiments/tests/ads-in-merch'; import { integrateIma } from '../experiments/tests/integrate-ima'; const defaultClientSideTests: ABTest[] = [ /* linter, please keep this array multi-line */ integrateIma, - adsInMerch, ]; /** 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 922f51ef285..657885f7e34 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,4 @@ import type { ABTest } from '@guardian/ab-core'; -import { adsInMerch } from './tests/ads-in-merch'; import { consentlessAds } from './tests/consentlessAds'; import { deeplyReadArticleFooterTest } from './tests/deeply-read-article-footer'; import { elementsManager } from './tests/elements-manager'; @@ -18,7 +17,6 @@ export const concurrentTests: readonly ABTest[] = [ deeplyReadArticleFooterTest, consentlessAds, integrateIma, - adsInMerch, elementsManager, prebidKargo, ]; diff --git a/static/src/javascripts/projects/common/modules/experiments/tests/ads-in-merch.ts b/static/src/javascripts/projects/common/modules/experiments/tests/ads-in-merch.ts deleted file mode 100644 index 6e94c6dce34..00000000000 --- a/static/src/javascripts/projects/common/modules/experiments/tests/ads-in-merch.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { ABTest } from '@guardian/ab-core'; - -export const adsInMerch: ABTest = { - id: 'AdsInMerch', - author: '@commercial-dev', - start: '2022-12-07', - expiry: '2023-11-30', - // TODO increase audience size and set offset once we know desired sample size - audience: 0 / 100, - audienceOffset: 0 / 100, - audienceCriteria: 'Opt in only', - successMeasure: - 'Test the commercial impact of showing adverts in merchandising-high and merchandising slots', - description: - 'Show adverts in merchandising-high and merchandising slots to browsers in the variant', - variants: [ - { - id: 'control', - test: (): void => { - /* */ - }, - }, - { - id: 'variant', - test: (): void => { - /* */ - }, - }, - ], - canRun: () => true, -}; From d6954828a06cc9eb275405d481e4928043cbaf6f Mon Sep 17 00:00:00 2001 From: Simon Adcock Date: Fri, 17 Nov 2023 06:49:32 +0000 Subject: [PATCH 2/2] upgrade @guardian/commercial to 11.23.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 518e0d12da7..56be45f8b39 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@guardian/atom-renderer": "^2.0.0", "@guardian/automat-modules": "^0.3.8", "@guardian/braze-components": "^15.0.1", - "@guardian/commercial": "11.21.0", + "@guardian/commercial": "11.23.0", "@guardian/consent-management-platform": "13.7.1", "@guardian/core-web-vitals": "^5.0.0", "@guardian/identity-auth": "1.1.0", diff --git a/yarn.lock b/yarn.lock index 7936aca8834..a7cf5cbe886 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2350,10 +2350,10 @@ resolved "https://registry.yarnpkg.com/@guardian/braze-components/-/braze-components-15.0.1.tgz#2c936c43e654f5ae28db254329eae1b4b5861641" integrity sha512-XNqYE9X/4aM5vZqiZInedvEZ9niPfdqwL7SjzNF0wnVbR+YObOC6QC68M521gTPcyca6r190qtnayv4GNO0peg== -"@guardian/commercial@11.21.0": - version "11.21.0" - resolved "https://registry.yarnpkg.com/@guardian/commercial/-/commercial-11.21.0.tgz#28bbd5adcc42d902d34e4b93d8357ba471b4db35" - integrity sha512-PG8as3pWnlvmEcU9ySb9sv1hKA4CMPyu9LyDgkP3gcvgKWCVNSdJSIujhpju9vgkf28WMF55+DDdcvsqRsEtsA== +"@guardian/commercial@11.23.0": + version "11.23.0" + resolved "https://registry.yarnpkg.com/@guardian/commercial/-/commercial-11.23.0.tgz#4d96fbf72615d1f0bff4c6fff5211b78f9425a1d" + integrity sha512-qlPZVYQarG1FW9JitttX/REIKpaPAQ4ZMt4pwSXLQYE/8WQ7l3O/Qt1WX8BacFU7EcdElr13Svb3KIA4vVK8DA== dependencies: "@changesets/cli" "^2.26.2" "@octokit/core" "^4.0.5"