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

Support GoogleChrome/web-vitals #40

Open
mpodorov opened this issue Oct 1, 2021 · 5 comments
Open

Support GoogleChrome/web-vitals #40

mpodorov opened this issue Oct 1, 2021 · 5 comments
Labels
enhancement New feature or request nostale This issue won't be marked as stale after long time of inactivity

Comments

@mpodorov
Copy link

mpodorov commented Oct 1, 2021

https://github.com/GoogleChrome/web-vitals script can calculate CLS, FID, LCP for site pages and send the data to Google Analytics.

It would be great to extend this plugin to allow it to receive the same data and show the statistics (Lighthouse-less mode of operation).

@DevDavido
Copy link
Owner

Thanks for your suggestion @mpodorov, I took a look on it and this functionality is offered already by Matomo's premium plugin SEO Web Vitals. Not sure if changing this performance audit plugin to cover such metrics from the frontend would violate Matomo's marketplace terms?

@DevDavido DevDavido added the enhancement New feature or request label Oct 2, 2021
@mpodorov
Copy link
Author

mpodorov commented Oct 2, 2021

SEO Web Vitals plugin does almost the same as your plugin (runs Lighthouse), but on Google side, not on own server, it can't get metrics directly from the analyzed site either.

@DevDavido
Copy link
Owner

Ok, it wasn't clear to me that the SEO Web Vitals plugin gets its metric data from Google. In this case I really support the idea to refactor this plugin and report the web vital metrics from the frontend instead of running audits in the backend. Each page could have a distribution of the measured web vital metrics then. The Js Tracker Custom plugin could be used to extend the tracking code of Matomo by this plugin. Is anybody willing to participate in this large plugin refactoring?

@DevDavido DevDavido added the nostale This issue won't be marked as stale after long time of inactivity label Oct 3, 2021
@DevDavido
Copy link
Owner

@Findus23 Would it be ok for Matomo to offer such an (refactored) plugin?

@tsteur
Copy link

tsteur commented Oct 3, 2021

@DevDavido We're not planning to offer such a refactored plugin where we track the data ourselves currently. That's because for many/most users this would result in doubling the number of tracking requests causing a lot of extra load on servers for a feature that is likely not used as often.

Additionally, the script for web vitals would need to be loaded first before anything else and before any content is loaded. This can slow down sites and the feature would not work out of the box easily and be tricky to install.

These are the main two reasons we're not planning on developing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nostale This issue won't be marked as stale after long time of inactivity
Projects
None yet
Development

No branches or pull requests

3 participants