Releases: SpeedCurve-Metrics/lux.js
Releases · SpeedCurve-Metrics/lux.js
v307
New features
- Session windows have been implemented for the CLS metric. This may reduce CLS scores on long-lived pages.
Bug fixes
- INP is now reset when
LUX.init()
is called. - Fixed a bug where INP could be recorded twice for a single page view.
- Ignore first-input entries for INP when there is a matching event entry.
Improvements
- The code that determines the page label based on Page Label URL Rules has been optimized, reducing the size of lux.js.
v306
New features
- The experimental Interaction to Next Paint (INP) metric is now collected.
Improvements
- Custom data is now only sent when it has been updated. This reduces beacon size and prevents unnecessary beacons from being sent.
Bug fixes
- Calling
LUX.init()
will now reset FID. Previously FID was only recorded for the first SPA page view. - Element timing values in SPA pages are now relative to the most recent
LUX.init
call rather than relative to navigationStart. - Fixed a bug where pages with many user timing entries did not have their path or domain recorded.
- Largest Contentful Paint is now measured as the time since activationStart, not navigationStart. This means LCP will be correctly recorded as zero for prerendered pages.
v305
Bug fixes
- Split user timing entries across multiple beacons when necessary to prevent data loss.
v304
Bug fixes
- Prevent a TypeError from being thrown when an interaction event is triggered with a target that is not an
Element
.
v303
Bug fixes
- Pagegroup matching exact pathname without wildcard e.g.
/foo
v302
New features
- Support of RUM page groups. New property
LUX.pagegroups
Improvements
- The start time of user timing measures is now recorded. In previous versions of lux.js only the duration was recorded.
Bug fixes
LUX.mark()
andLUX.measure()
are now fully compatible with their native counterpartsperformance.mark()
andperformance.measure()
. In previous versions of lux.js these functions did not support an options object as the second parameter.- Interaction element attribution for elements with the
data-sctrack
attribute has been fixed. In previous version of lux.js thedata-sctrack
attribute only took priority on the element that was interacted with. It now takes priority even when it has been set on an ancestor element. See thedata-sctrack
documentation for more information.
Other
- Some legacy vendor-specific code has been removed: lux.js no longer uses
chrome.loadTimes()
or anyperformance.webkit*
functions. Browsers that supported these vendor functions will now use polyfills or fallbacks.
v301
New features
- The synthetic onload time for SPAs can be marked with
LUX.markLoadTime()
, allowingLUX.send()
to be called later in the page lifecycle. - Added the SpeedCurve RUM Debug Parser to help interpret the debug messages.
LUX.getDebug()
now includes events that help to debug some metrics including LCP, CLS, element timing, and long tasks.- Source maps are now available for lux.js.
Bug fixes
- Fixed a bug where JavaScript errors were only tracked on the first SPA page view.
v300
This is considered a major lux.js release and may contain some breaking changes.
Breaking changes
LUX.beaconMode
has been removed.LUX.getDebug()
now returns a different format.
New features
- The pathname of the current page is now tracked.
- JavaScript error tracking can be disabled by setting
LUX.errorTracking = false
. - The maximum number of JavaScript errors tracked per page view can be controlled with
LUX.maxErrors = <number>
. - The maximum measure time can be controlled by setting
LUX.maxMeasureTime = <number>
. After this time, data collection will stop and the beacon will automatically be sent. This can be useful to prevent dynamic content like adverts from affecting your CLS and LCP scores late in the page load. The time is specified in milliseconds, and the default value is60_000
(1 minute).
Improvements
- An unload handler is no longer used to track abandoned pages, except in legacy web browsers. The visibilitychange and pagehide events are used instead.
- Developers who implement lux.js into a SPA by using
LUX.auto = false
can now opt-in to abandoned page tracking by settingLUX.sendBeaconOnPageHidden = true
.
Bug fixes
- Calling
LUX.init()
on the initial page load will no longer lose previously-captured data.
v216
Bug fixes
- Ensures
LUX.beaconMode
is not overwritten in SPAs
v215
Bug fixes
- Reinstates buffered long tasks with corrected PerformanceObserver logic
Enhancements
- Rewrite JS page label logic to use
Function()
rather thaneval()
to prevent local scope access, for better performance, and to decrease bundle size.