GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.35k stars 105 forks source link

Upgrade to the latest web-vitals.js attribution build #110

Closed rviscomi closed 1 year ago

rviscomi commented 1 year ago

We should maybe also consider something like dependabot to keep this repo up to date with upstream web-vitals changes.

rviscomi commented 1 year ago

It seems like the version of web-vitals.js used by the extension is also so old that it's causing pages to be ineligible for bfcache due to it attaching an unload listener. This was fixed in https://github.com/GoogleChrome/web-vitals/pull/68 so upgrading should fix it.

tunetheweb commented 1 year ago

As part of this we should change all the getXXX calls to onXXX. The older, getXXX ones are still supported for now, but are deprecated and we do want to remove them eventually.

tunetheweb commented 1 year ago

The latest version (3.3.1 at the time of writing) includes a standard and attribution build. Do you mean to upgrade to 3.3.1 AND switch to attribution? Or just to do the upgrade for now and have the ability to switch to attribution if we need it (e.g. for #112) at a later point?

tunetheweb commented 1 year ago

It seems like the version of web-vitals.js used by the extension is also so old that it's causing pages to be ineligible for bfcache due to it attaching an unload listener. This was fixed in GoogleChrome/web-vitals#68 so upgrading should fix it.

This is incorrect. It was on a beta version of 3.0.0 but that was well after the unload handler was removed. Also I tested the new version and it still fails bfcache. But it's not complaining about unload handlers but about this:

Extensions with long-lived connection attempted to send messages to frames in back/forward cache

Opened #117 for this as it's a separate issue.

rviscomi commented 1 year ago

Thanks for the correction :)

Do you mean to upgrade to 3.3.1 AND switch to attribution? Or just to do the upgrade for now and have the ability to switch to attribution if we need it (e.g. for #112) at a later point?

This issue should be both upgrading the dependency and starting to make use of the new attribution info.

tunetheweb commented 1 year ago

This was completed.