@gustavpursche opened this Issue on July 5th 2020

First of all my apologies, for opening this issue here. I've tried at the forum but my account got closed for an unknown reason.

I saw that 4.0.0 will bring a great new performance report page. Great news, thanks for that in advance already!

I was wondering whether you considered including the recently proposed web vitals for these reports or whether it's easy to track these from the JS client?

Why would Web Vitals be helpful?

  • they are user centric
  • google announced they'll become a ranking factor, which makes them quite important for businesses
  • they are helpful for developers

What are the Web Vital metrics:

  • Largest Contentful Paint (LCP): measures loading performance. To provide a good user experience, LCP should occur within 2.5 seconds of when the page first starts loading.
  • First Input Delay (FID): measures interactivity. To provide a good user experience, pages should have a FID of less than 100 milliseconds.
  • Cumulative Layout Shift (CLS): measures visual stability. To provide a good user experience, pages should maintain a CLS of less than 0.1.
@Findus23 commented on July 5th 2020 Member

I've tried at the forum but my account got closed for an unknown reason.

That really shouldn't happen. There has been a large amount of new spam accounts I deleted, so there is a chance yours was in this list in which case I am sorry. But I also can't find any account containing your last name in the recent logs. In case you are still interested in the account, please create a new one or contact per E-Mail me (lukas at the domain of Matomo).

On the topic: It seems like the web vitals library just fetches the data from the newly proposed Event Timing API (https://wicg.github.io/event-timing/) which is supposed to give google-lighthouse-like data on page loads.

I'd say as the Event Timing API is a pretty new draft for a new standard and only Chrome has yet implemented it* we could wait a bit to see how it turns out and how many browsers will support it (in the meantime it could be a Matomo plugin on the marketplace)

* I know that Chromium has a huge market share, but I'd still like to imagine that the web is an actual independent set of standards with multiple independent implementations together forming new standards in a democratic way instead of just Google implementing an idea (even if it is a good idea) in Chromium, documenting it as a standard draft and passively forcing all other browsers to implement it or major websites will be broken in them.

See also:

@tsteur commented on July 5th 2020 Member

Didn't know that event timing existed. Too bad we can't get this information from existing performance API yet it would have been really great to have these metrics.

Here are currently supported browsers https://caniuse.com/#feat=mdn-api_performanceeventtiming (Chrome, Edge, ...)

I see Firefox is currently implementing the Frame timing api but can't find anything re "event timing".

There maybe ways to calculate this already:

@gustavpursche commented on July 6th 2020

Thanks for the quick replies!

@Findus23

I'd say as the Event Timing API is a pretty new draft for a new standard and only Chrome has yet implemented it* we could wait a bit to see how it turns out and how many browsers will support it (in the meantime it could be a Matomo plugin on the marketplace)

I agree with you on that. I don't know what your policy with these new APIs are, but I think to wait till at least two engines have implemented something is a sensible thing to do. I don't think it will take Mozilla very long to build this in, since saying "it will be a ranking factor" usually speeds things up.

On the other hand: Progressive Enhancement is a good way to implement new features. Had a quick look at the github repository for web vitals and it seems that's the way they do it. Of course it's different for Matomo, since it would also skew the performance metrics page a bit of only Chromium Browsers would contribute to the data.

I'll keep an eye on things and come back to this issue as soon as I see some other public signal around the implementation :rocket:

@DevDavido commented on July 12th 2020

@gustavpursche I've been working on such a performance measuring functionality for Matomo and if you like you can try it:
https://github.com/DevDavido/performance-audit-plugin

@gustavpursche commented on July 14th 2020

@DevDavido Thanks for the hint. I'll try it out first thing after my vacation! ✨

Powered by GitHub Issue Mirror