RUM update: lux.js v4.0.20

1 July 2024 (UTC)

We have released version 4 of our lux.js RUM library. This is a major update, although you will not notice any changes just yet compared to version 3.

v4.0.20 is the first v4 release. All future lux.js versions will use semantic versioning.

What has changed?

Prior to v4, lux.js collected metrics until the onload event was fired[1], and a beacon was sent immediately afterwards. Any metrics that occurred after the beacon was sent were ignored. This mainly affected metrics that could change throughout the lifecycle of a page, for example Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS).

With lux.js v4, the original beacon will still be sent. However a second beacon will continue to collect LCP, INP, and CLS until the pagehide event or until 60 seconds after the page load began - whichever happens first. This will bring SpeedCurve RUM in line with other tools like the Chrome User Experience Report (CrUX) and the web-vitals JavaScript library.

The new beacon is also on a different domain. If your website has a Content Security Policy (CSP), you will need to add beacon.speedcurve.com to the connect-src.

How will these changes affect me?

Since these metrics will be collected for longer, we expect most people will see the values of these metrics increase slightly.

Note that if you set LUX.auto = false and manually call LUX.send() in your SpeedCurve RUM implementation, these changes will not affect you, as the new beacon will still be sent when you call LUX.send().

When will these changes take effect?

We are planning to enable the new beacon on 8 July 2024.

8 July update: We are sending the new beacon for most RUM customers, however we are holding back on showing the updated metrics in SpeedCurve. We expect the updated metrics will be available towards the end of July.

Can I opt out of the new beacon?

Yes, you can set LUX.enablePostBeacon = false to disable the new beacon. This should be seen as a temporary opt-out to allow you to control when your metrics change. We may ignore this setting in the future.

How can I transition to the updated metrics on my own timeline?

If you would like to take control of when your metrics change, you can disable the new beacon (see above) and choose a time to switch over that suits you best. You may also want to use LUX.minMeasureTime to force metrics to be gathered for longer. Gradually increasing this value over time would gradually increase your metric values, which for some people may be preferable to having a sudden jump in metric values.


1. Metrics were collected until either the onload event was fired or until the LUX.minMeasureTime had elapsed, whichever happens last.