v8.0.0
- feat: made Perfume.js a superset of the Web Vitals library. This means you will get access to all the latest metrics from Google and plus all the extra features you learn to love from Perfume.
- feat: with Web Vitals now we get for free also the INP metric.
Breaking Changes
As now we are a superset of Web Vitals, here a quick overview on what changed:
- Metrics like TTFB, CLS might have a slight change in value as the Web Vitals lib covers more edge cases.
- The CLS metric will fire when the page changes visibility and not anymore after FID.
- The
analyticsTracker
options will use the wordattribution
for all custom data of each metric, andvitalsScore
will change torating
.
new Perfume({
...
analyticsTracker: ({ attribution, metricName, data, navigatorInformation, rating }) => {
// Report the metric with your favorite analytics tool
}
});
- The name for all Vital metric will be in uppercase, such as
FID
,LPC
, etc...