- fix: Improve browser compatibility around globalThis.
- fix: Fix import crash under node.js
- fix: Added extra check for undefined values. #260
- feat added export for
markNTBT
function.
A long time coming, but we are back :) We did some internal cleanup, making the library more accessible for tracking Critical User Journeys.
The most significant change is that we moved away from being Object-oriented and everything is Functional-oriented, which means to start Perfume, you can do.
import { initPerfume } from 'perfume.js';
initPerfume({
analyticsTracker: ({ metricName, data }) => {
myAnalyticsTool.track(metricName, data);
})
});
- feat remove
enableNavigationTracking
and have the behavior as the default. - feat
getRating
has been consolidated intogetVitalsScore
. - chore rename
incrementUjNavigation
totrackUJNavigation
. - chore deprecate
endPaint
.
- fix: disable
requestIdleCallback
for CLS and INP reports (#212)
- feat: added
navigationType
support (#210) - fix: run
po
for longtask only once (#215)
- feat: added ability to provide web-vitals report options
- fix: added back the
visibility.isHidden
check when reporting metrics. Apparently, without this check, we end up over-reporting metrics that risk being inaccurate because the page suddenly becomes hidden.
Currently, the only initial metrics that will be reported after visibility changes are CLS and INP.
- 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.
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...
- feat: added
redirectTime
as new Core Vitals metric (rt
).
- feat: changed both TBT and NTBT Vitals to be less than 200 milliseconds for Good Score.
- feat: added
perfume.markNTBT
as a way to mark the new Navigation Total Blocking Time metric.
- feat: added
redirectTime
tonavigationTiming
, this will help better understand performance regression related to redirect requests.
- fix: terser properties updated.
- feat: improved CLS and all metrics accuracy to four digits after the decimal point.
- feat: introduced Time to First Byte as his own top-level metric.
- feat: simplified Total Blocking Time metrics into one solo version that focuses on waiting 10s after First Input Delay.
- feat: increased the
maxMeasureTime
default value from 15s to 30s, this will allow better data for metrics like LCP which tend to have much higher values.
The two key breaking changes in v6 are focus around the simplification of First Input Delay and Total Blocking Time, and the increase of the default value for maxMeasureTime
.
- feat: added the raw
performanceEntry
object in the reporting for FID and FID Vitals. This will help developer to do more custom analysis based on the FID target.
- fix: miss PerformanceObserver in rollup config
- fix: added processingStart in minified file
- fix: added fidVitals to vitalsScore
- fix: conditionally make calls to PerformanceObserver.takeRecords which does not exist in Safari #138
- fix: report CLS when value is 0
- feat: prepare new FID iteration for v6
- chore: Italian README #137
- fix: added storage.estimate feature detection #136
- fix: measuring with
perfume.end()
now returns the duration of the annotation instead of an object
- feat: simplified the
analyticsTracker
by having all duration value inside thedata
property - feat: enabled
PerformanceObserver
for all browser, before was only for Chrome - feat: added Total Blocking Time #112
- feat: added Total Blocking Time Final for when the page's lifecycle state changes to hidden
- feat: added secondary log for LCP and CLS called LCP Final & CLS Final for when the page's lifecycle state changes to hidden
- feat: added
storageEstimateQuota
andstorageEstimateUsage
to the navigatorInfo results - fix: added feature detection for
clearMarks
- fix: solved issue with
storageEstimate
and created his own event - refactor: reduced library size to 2Kb gzipped
Until now, we allowed only Chrome to run the PerformanceObserver interface because of possible cross-browser issues. One in particular related to Firefox 58: https://bugzilla.mozilla.org/show_bug.cgi?id=1403027. Starting from Perfume.js v5, we are going to remove this limitation.
Having both duration
and data
inside the analyticsTracker
, it started causing some confusion. Starting from v5, we will keep only data
and have any information from duration
contained inside data
. Please make sure to change the code inside your analyticsTracker
.
More changes:
- Removed the development logging options, in favor of focusing more on the
analyticsTracker
method. - Removed warning logs for
start()
andend()
methods, because the code already handles those edge cases. - Renamed most of metric names, please read README Quickstart to see the latest name version we have. We made most of metric with short names, to allow the library to be even smaller.
- Simplified
EstimateStorage
values, to help reduce library size.
- fix: added extra check to avoid multiple
disconnectPerfObserversHidden
calls
- fix: added extra check in case
observer
object is not present
- feat: added Total Blocking Time Final metrics
- refactor: reduced library kb part XI
- refactor: reduced library kb part X
- fix: added extra check to remove observer reference
- fix: added back analyticsTracker into the configs
- refactor: reduced library kb part IX
Removed the development logging options, in favor of focusing more on the analyticsTracker
method.
- refactor: reduced library kb part VIII
Removed warning logs for start() and end() methods, because the code already handles those edge cases.
- refactor: reduced library kb part VII
Renamed most of metric names, please read README Quickstart to see the latest name version we have. We made most of metric with short names, to allow the library to be even smaller.
- refactor: reduced library kb part VI
- refactor: reduced library kb part V & simplified estimateStorage metric result
Simplified EstimateStorage values, to help reduce library size.
- refactor: reduced library kb part IV
- refactor: reduced library kb part III
- refactor: reduced library kb part II
- refactor: reduced library kb part I
- feat: added secondary log for LCP/CLS when the page's lifecycle state changes to hidden
- fix: solved issue with
storageEstimate
and created his own event - fix: removed extra calls for
totalBlockingTime
- feat: added Total Blocking Time #112
- feat: added
storageEstimateQuota
andstorageEstimateUsage
to the navigatorInfo results - fix: added feature detection for
clearMarks
- feat: enabled
PerformanceObserver
for all browser - feat: simplified the
analyticsTracker
by having all duration value inside thedata
property
Until now, we allowed only Chrome to run the PerformanceObserver interface because of possible cross-browser issues. One in particular related to Firefox 58: https://bugzilla.mozilla.org/show_bug.cgi?id=1403027 Starting from Perfume.js v5.0.0-rc.1, we are going to remove this limitation, and we are going to monitor any new open issues and address them immediately.
Having both duration
and data
inside the analyticsTracker
, it started causing some confusion. Starting from v5, we will keep only data
and have any information from duration
contained inside data
. Please make sure to change the code inside your analyticsTracker
.
- feat: added serviceWorkerStatus in navigatorInfo
- feat: added support for Cumulative Layout Shift score #80
- fix: missed new property as reserved words
- fix: replaced isLowEnd with isLowEndDevice and isLowEndExperience
- fix: moved isLowEnd inside navigatorInformation object
- feat: added isLowEnd property based on Adaptive Data Loading perfomance pattern
- fix: added navigatorInformation to reserved properties
- feat: added hardwareConcurrency and deviceMemory support
- refactor: made FP, FCP and FID as default metrics.
- fix: restore UMD module breaking #95
- fix: transferSize value in getNavigationTiming
- feat: added network information support #94
- feat: added Clear method #71
- feat: allowed
endPaint
to accept aneventProperties
object to do custom reporting #68
- fix: total value for data consumption
- feat: added Resource Timining support
- feat: added Data Consumption metric
- feat: added Largest Contentful Paint support
- refactor: reduced the library from over 4Kb to 1.9Kb gzip
- fix: pushTask is undefined during hot-reloading #88
- fix: added check in case Navigation Timing is not supported
- fix: check if
window.performance.mark
is supported when used.start()
or.end()
- feat: added Navigation Timing #83
- feat: added more flexibility for log, sendTiming and analyticsTracker arguments #70
- feat: Added initial support for Data Consumption #85
- feat: Added support to retrieve buffered FP/FCP events #81
- feat: Added support for first-input and removed EmulatedPerformance #60 #82
- feat: Replace Map by plain old objects to support more browsers #78
- refactor: removed default Google Analytics support, instead analyticsTracker will be the default method to communicate with the backend.
- refactor:
log
,sendTiming
andanalyticsTracker
gets one solo options object instead of the original arguments - refactor: Dropped support for EmulatedPerformance
- feat: Discard queued tasks if running them as microtasks isn't supported #77
- feat: added Navigation Timing #83
- refactor: removed default Google Analytics support, instead analyticsTracker will be the default method to communicate with the backend.
- feat: added more flexibility for log,
sendTiming
andanalyticsTracker
arguments #70
- refactor:
log
,sendTiming
andanalyticsTracker
gets one solo options object instead of the original arguments
- feat: Added initial support for Data Consumption #85
- feat: Added support to retrieve buffered FP/FCP events #81
- feat: Added support for first-input and removed EmulatedPerformance #60 #82
- refactor: Dropped support for EmulatedPerformance
- feat: Replace Map by plain old objects to support more browsers #78
- feat: Discard queued tasks if running them as microtasks isn't supported #77
- feat: Added option for browser and OS infos #45
- performance: Now we use Idle Untile Urget strategy for logging and analytics #55
- core Removed Time to Interactive from Perfume #54 😬 (FID is a better metric for RUM)
- fix: Added Angular AOT support for PerfumeModule
- feat: Initial Angular decorator implementation
- feat: New Observer APIs #46
- fix: Added TTI polyfill head script inside Perfume #44
- feat: Added First Input Delay metric #33
- feat: Send other metrics to google analytics using the sendTiming method #39
- fix: Stop sendTiming when tab is hidden #40
- fix: 'PerformanceObserver is undefined' on Edge #37
- fix: All console logging is now disabled when the
config.logging
flag is set to false #35 - build: export library with the same name for all bundles #32
- feat: timeToInteractive as promise #23
- style: update tslint #31
- build: Minify umd bundle #30
- build: Do not bundle deps into main & module entries #28
- fix: emulated performance getFirstPaint() passes array of entries
- feat: Init FirstPaint metric
- uglify: Minify generated bundle
- start/end: Fixed support performance.measure in Safari
- measure: Fixed getMeasurementForGivenName return value
- start/end: Fixed Performance.getDurationByMetric method
- test: Increased cross-browser tests and separate the native logic from the emulated version #24c8996 #22.
- config: Pass config into constructor #14
- fcp: Use PerformanceObserver for FCP #18
- tti: Time to Interactive #15
- endPaint: Added endPaint() method #13
- GA: Fixed timingValue
- GA: Fixed timingVar
- GA: Fixed window.ga type
- GA: Init Google Analytics #12
- start: Fixed start method; Increased tests coverage; #8