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 build
ornpm run watch
- Run the tests with
npm run test
- Check for linting errors with
npm run lint
and automatically fix them (where possible) withnpm run lint-fix
- Propose changes in a pull request
- Once approved, merge changes to the
main
branch - Increment the
SCRIPT_VERSION
constant on themain
branch - Add release information into CHANGELOG.md in this repo
- Create a new release in GitHub, following the naming convention and documentation process of previous releases
- Run
npm run build
to generate the lux.js bundles. - Follow the rum-backend release process to deploy the updated lux.js bundles.