Add INP breakdown entries to the attribution build
Should we add the following entries?
inputDelayprocessingTimepresentationDelay
I know we can easily calculate those with the eventEntry but I'm wondering how many people know about that, so the ideia here is more about encouraging people to track this important information.
If we don't wanna add those fields for some reason maybe we can think about some docs or article to explain how to calculate those fields? I only realized I could track INP breakdown when reading this and I didn't find an example on how to calculate it. For some reason I already had processingTime (probably copied from some article/docs) and then I copied the input delay logic from some FID docs and used those 2 and the INP value itself to calculate the presentation delay but I was not sure that was the correct way of doing that.
Yes we should, but it's a little more complicated than that (which is why we haven't done it yet!) as an interaction may have several components.
Consider a click, which has mouseup, pointerup, and click events, but which are all part of the same interaction. The processing time of the mouseup and pointerup events can cause a "input delay" to the click event. Similarly, just cause the mouseup event happened first it would see a long "presentationDelay", but if that is due to "processingTime" of the other two events when we would't want to imply it was due to the presenation time itself.
So ideally we want to group them together into "inputDelay" for the whole interaction (i.e. all three events), the "processingTime" of the whole interaction (i.e. all three events), and finally the "presentationDelay" of the whole interaction.
So it's a bit more complicated than just looking at the "INP event" as reported by web-vitals.js now and then calculating the inputDelay, processingTime, and precentationDelay of just that one event. So we haven't got to it just yet.
FYI, more info on all this here if you want some of the full, gory, details: https://github.com/mmocny/tpac_2023_workshop_responsiveness?tab=readme-ov-file
Hmm so that could be the reason why I'm seeing so much time spent on presentation delay. Thanks for clarifying
Completed with #442 and will be included in v4