---
agentTools:
  projectIndex: https://support.speedcurve.com/llms.txt
---

# RUM update: lux.js v300

**22 February 2022**

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](https://developer.mozilla.org/en-US/docs/Web/API/Location/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 is `60_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 setting `LUX.sendBeaconOnPageHidden = true`.

### Bug fixes

* Calling `LUX.init()` on the initial page load will no longer lose previously-captured data.