Here are some tips for figuring out why data is missing from your RUM dashboards in SpeedCurve.
The beacon is being sent too early
RUM data is not collected after the beacon is sent. Out of the box, SpeedCurve's RUM library lux.js will send the beacon after the onload event. Any metrics that occur after the onload event will not be recorded, and this data will not be available in your dashboards. If your pages continue to load after the onload event, you should consider setting
LUX.auto = false and manually sending the beacon when your page has finished loading.
LUX.init is called on the first page load
If you are using
LUX.auto = false, you do not need to call
LUX.init for the very first page load. If you do this, lux.js will throw away all data it has collected up until that point.
LUX.init should only be called when a SPA page transition begins.
You can check whether this is happening on your pages by calling
LUX.init before the first
LUX.send message, then your pages are calling
LUX.init too early.
Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS) are metrics that occur over the full lifetime of the page, and may occur after the beacon has already been sent. To resolve this, you can configure RUM to collect data for longer.
For most RUM integrations, you can achieve this by setting the LUX.minMeasureTime property. We recommend starting out with a smaller value like 5000 (5 seconds), and gradually increasing it if you are still seeing low values for LCP or CLS.
If your RUM integration uses
LUX.auto = false, the method above will not have any effect and you will need to call
LUX.send() later instead. See our Recommended implementation for a SPA section to read how we recommend collecting data for as long as possible when
LUX.auto = false.
Some metrics are not available in all SPA page views, because the browser only reports them for the very first page load. These metrics include:
- Any navigation timing metrics (DOMContentLoaded, TLS time, connection time, etc)
- Start Render
- First Contentful Paint (FCP)
- Largest Contentful Paint (LCP)
- Page Load (for SPAs this is recorded as the time between
These metrics will be recorded for a full navigation event, i.e. the browser loading a "normal" page. They will not be recorded for subsequent page transitions within a SPA.
Updated 5 months ago