File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/sui-react-web-vitals/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ export default function WebVitalsReporter({
96
96
const handleAllChanges = ( { attribution, name, rating, value} ) => {
97
97
const amount = name === METRICS . CLS ? value * 1000 : value
98
98
const pathname = getPathname ( route )
99
- const isAllowed = allowed . includes ( pathname )
99
+ const routeid = getRouteid ( )
100
+ const isAllowed = allowed . includes ( pathname ) || allowed . includes ( routeid )
100
101
101
102
if ( ! isAllowed || ! logger ?. cwv || rating === RATING . GOOD ) return
102
103
@@ -106,6 +107,7 @@ export default function WebVitalsReporter({
106
107
name : `cwv.${ name . toLowerCase ( ) } ` ,
107
108
amount,
108
109
path : pathname ,
110
+ ...( routeid && { routeId : routeid } ) ,
109
111
target,
110
112
loadState : attribution . loadState ,
111
113
visibilityState : document . visibilityState ,
You can’t perform that action at this time.
0 commit comments