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

Log wrong interactions. #41

Open
szczepanb opened this issue Nov 12, 2023 · 2 comments
Open

Log wrong interactions. #41

szczepanb opened this issue Nov 12, 2023 · 2 comments

Comments

@szczepanb
Copy link

.filter((entry) => !entry.interactionId)) {

Please check the snippet for interaction:

I see that this snippet logs interaction only with interactionId = 0, and it seems to be wrong, according to documentation and example here: https://web.dev/articles/diagnose-slow-interactions-in-the-lab?hl=pl#use_a_javascript_snippet

We should log with interactionId > 0.

@nucliweb
Copy link
Owner

This line:

.filter((entry) => !entry.interactionId)) { 

It's the same that this line:

if (!entry.interactionId) continue;

@szczepanb
Copy link
Author

Yes,

But You filter interactions with interactionID = 0. It gets only interaction without ID. The documentation says that only interactions with ID are made by user

if (!entry.interactionId) continue;

Here, We are in for loop, when interactionID is 0 they continue and don't log this interaction.

When I use snippets from web.dev and Your at the same time, I see logs in console only from snippet from web.dev.

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

2 participants