This repository contains the source code for lux.js, SpeedCurve's real user monitoring (RUM) script.
- Sign up for a SpeedCurve account
- Go to the Settings page and scroll to the bottom of the page
- Click on Edit RUM
- Click on the JS Snippet tab
- Copy the RUM JS snippet into the
<head>of your page
⚠️ Self-hosting lux.js is not recommended. Please read our self-hosting documentation for more information.
See the lux.js API documentation.
- Browser compatibility - lux.js runs and gathers basic metrics in every browser that supports ES3, while still gathering modern metrics from evergreen browsers.
- Small size - lux.js aims to be under 10 KB when minified and compressed.
- Low overhead - lux.js creates only a handful of event handlers and observers. Most metrics are calculated on-demand before a beacon is sent.
- Compile the lux.js script with
npm run buildornpm run watch - Run the tests with
npm run test - Check for linting errors with
npm run lintand automatically fix them (where possible) withnpm run lint-fix - Note: object properties beginning with an underscore (
_) will be mangled