From 0b3a14a94a3b1da8e3bd1fcec3ff864573047e80 Mon Sep 17 00:00:00 2001 From: Anna Beddow Date: Wed, 1 Jul 2026 08:50:35 +0100 Subject: [PATCH] Do not report to ophan if a user has manually turned off autoplaying videos via accessibility settings. --- ab-testing/config/abTests.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ab-testing/config/abTests.ts b/ab-testing/config/abTests.ts index 75180923317..be9a82b1475 100644 --- a/ab-testing/config/abTests.ts +++ b/ab-testing/config/abTests.ts @@ -169,6 +169,16 @@ const ABTests: ABTest[] = [ audienceSize: 0 / 100, groups: ["control", "variant"], shouldForceMetricsCollection: false, + shouldReportToOphan: () => { + const flashingElements = window.localStorage.getItem( + "gu.prefs.accessibility.flashing-elements", + ); + const autoplayVideo = window.localStorage.getItem( + "gu.prefs.accessibility.autoplay-video", + ); + /* Don't report if either preference has been disabled as videos will not autoplay*/ + return flashingElements !== "false" && autoplayVideo !== "false"; + }, }, { name: "martech-admiral-adblock",