From 0e295ffd65fa72962b397b85b0355fd066163086 Mon Sep 17 00:00:00 2001 From: Alexandre Capt Date: Wed, 17 Apr 2024 12:02:49 +0200 Subject: [PATCH] feat: enable reportAll for all projects --- src/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 20af02d..e0f9f27 100644 --- a/src/index.js +++ b/src/index.js @@ -99,7 +99,6 @@ sampleRUM.drain('cwv', (() => { sampleRUM('cwv', data); }; - const featureToggle = () => ['blog.adobe.com', 'www.revolt.tv'].includes(window.location.hostname); const isEager = (metric) => ['CLS', 'LCP'].includes(metric); // When loading `web-vitals` using a classic script, all the public @@ -107,7 +106,7 @@ sampleRUM.drain('cwv', (() => { ['FID', 'INP', 'TTFB', 'CLS', 'LCP'].forEach((metric) => { const metricFn = window.webVitals[`on${metric}`]; if (typeof metricFn === 'function') { - const opts = isEager(metric) ? { reportAllChanges: featureToggle() } : undefined; + const opts = isEager(metric) ? { reportAllChanges: true } : undefined; metricFn(storeCWV, opts); } });