From ee5c0e1f6052f0b006dd825654ef8f3bf79abd1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Leo=CC=81n?= Date: Tue, 7 Nov 2023 09:40:26 +0100 Subject: [PATCH] feat(packages/sui-react-web-vitals): add visibilityState property --- packages/sui-react-web-vitals/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sui-react-web-vitals/src/index.js b/packages/sui-react-web-vitals/src/index.js index 78705b0d7..0fe2d5c93 100644 --- a/packages/sui-react-web-vitals/src/index.js +++ b/packages/sui-react-web-vitals/src/index.js @@ -113,7 +113,8 @@ export default function WebVitalsReporter({ path: hasPathOnRoute ? pathname : getNormalizedPathname(pathname), target, loadState: attribution.loadState, - ...(attribution.eventType && {eventType: attribution.eventType}) + ...(attribution.eventType && {eventType: attribution.eventType}), + visibilityState: document.visibilityState }) }