anniesullie / web-page-abandonment-api

Proposal for new API which makes it easier for developers to know when page loads were abandoned.
10 stars 2 forks source link

Resolve overlap with Network Error Logging API #1

Open anniesullie opened 4 years ago

anniesullie commented 4 years ago

If we use a reporting API to report abandonment, there will be an overlap with the abandoned error in the Network Error Logging API. That API is similar to this one, but subtly different:

igneel64 commented 4 years ago

One case that came to my mind and might point out the kind of overlap/combination with NEL is if we want to include in the new metric cases like:

Because I see that this is indeed a case that we could use NEL data, would we consider this case an occurance of abandonment?

anniesullie commented 4 years ago

My opinion in the case of errors is that the page is not really abandoned--the user received some kind of error message, which is kind of equivalent to an FCP on a well-behaved page. Would love to hear more opinions on this.

neilstuartcraig commented 4 years ago

I just had a read of this and it's great, I think it'd be really valuable. My personal opinion is that NEL should not include abandoned as it's not a network error, it's a user action (assuming i am not missing something).

What I'd suggest as a possible addition to your proposal @anniesullie is that abandoned is actually removed from NEL and replaced by this. Then also that there's a phase or type added to the abandonment report which would be e.g. during-request or during-download etc. - that would be a really useful discriminator to use in reports.

I also would strongly favour using the reporting API rather than Chrome User Experience reporting as it's (at least potentially) cross-browser and we can more easily merge the data with our existing NEL, CSP, Expect CT etc. reporting.

igneel64 commented 4 years ago

@neilstuartcraig a discussion about the "where" could this be exposed, can also be found here https://github.com/anniesullie/web-page-abandonment-api/issues/3#issuecomment-587951678