Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it also possible for LCP to report immediately after collection? #263

Open
SKNlEI opened this issue May 21, 2024 · 0 comments
Open

Is it also possible for LCP to report immediately after collection? #263

SKNlEI opened this issue May 21, 2024 · 0 comments

Comments

@SKNlEI
Copy link

SKNlEI commented May 21, 2024

LCP indicators reported timing is the page triggered click and other time, there is a situation is the user to enter the page, click on the time directly jumped the page, this time the data reported, the use of requestIdleCallback will lead to the report of the page url(use location.href get) is the page after the jump? This will affect the statistics of the index.

For example, the current page address is http://location:3000/new, click to jump to the page http://location:3000/detail, this time to trigger the LCP report, due to the use of requestIdleCallback, may be the emergence of a new page collection to play the LCP indicators, reported to the detail?

Is it also possible for LCPs to report immediately after collection?

// Send CLS and INP metrics immediately,
// because this metrics are reported when page is hidden or closed
if (['CLS', 'INP', 'LCP'].includes(measureName)) {
reportTask();
} else {
pushTask(reportTask);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant