This guide provides detailed information about Split's JavaScript Real User Monitoring (RUM) agent.
Split's RUM agent collects detailed information about your users' experience when they visit your application. This information is used to analyze site impact and measure the degradation of performance metrics in relation to feature flag changes.
Language Support
Split's RUM agent is compatible with the majority of today's popular browsers with the exception of IE 10+. We rely on the browser Beacon API support to reliably send the information to Split services for processing. Currently, IE does not support such API, in which case Split defaults to use XHR instead. For more information about beacon API support, refer to the browser compatibility table.
See the metrics table below for specific metric and their compatibility with the browser of your choice.
Initialization
Split's JavaScript RUM agent is delivered via a small script. It contains the code for the agent itself which collects performance data from the browser and sends the data back to Split services for analysis against your feature flags. Follow the steps below to install the agent.
Add the snippet to the page
Add the following javascript snippet as high as possible in the <head>
section of the main page:
<script src="https://cdn.split.io/rum-agent/rum-agent-0.2.1.min.js"></script>
<script>
window.SPLIT_RUM.init('YOUR_BROWSER_API_KEY')
.identities([
{ key: 'key', trafficType: 'A_TRAFFIC_TYPE' },
{ key: 'ANOTHER_key', trafficType: 'ANOTHER_TRAFFIC_TYPE' }
]);
</script>
Alternatively, one may choose to initialize the agent in two parts. First, by adding the reference to the snippet as high as possible in the <head>
section just like before, and then postpone setting the identities once that information is available later in the code.
<script src="https://cdn.split.io/rum-agent/rum-agent-0.2.1.min.js"></script>
<script>
window.SPLIT_RUM.init('YOUR_BROWSER_API_KEY');
</script>
<!-- Later in the page, anywhere where you can add javascript, add: -->
<script>
window.SPLIT_RUM.identities([
{ key: 'key', trafficType: 'A_TRAFFIC_TYPE' }
]);
</script>
Metrics
Split's RUM agent collects a number of browser and user metrics. Refer to the image and table below for a broader description of all metrics collected and information about browser compatibility.
Metric name | Description | Chrome/Android Chrome | Firefox | Safari/iOS | IE/Edge |
---|---|---|---|---|---|
time.to.first.byte | Time in milliseconds between page download to when the first byte is received | 13+ | 7+ | 9+ | 9+/12+ |
time.to.dom.interactive | Time in milliseconds until the document is ready and before the full page load time. If this time is high it usually implies that the critical rendering path is complex and that the download of resources will start later. | 13+ | 7+ | 9+ | 9+/12+ |
page.load.time | Time in milliseconds elapsed until the document is loaded and parsed | 13+ | 7+ | 9+ | 9+/12+ |
time.to.interactive | Time in milliseconds between page.load.time and until the page is ready to be interactive by the user. this may include JavaScript code being executed and performing some calls. | 58+ | - | - | - |
error | Any JavaScript or Network call errors | 25+/75+ | 35+ | 11.1+/11+ | 9+ |
Properties
Each event for the metrics described above automatically includes three properties that can be use to filter certain events when defining feature flag metrics for experimentation purposes. Learn more about metric definitions and how to define property filters
name | Description | values |
---|---|---|
connectionType | Speed of connection | 2g, 3g, 4g |
url | The url that generated the metric | |
userAgent | The user agent |
Comments
0 comments
Please sign in to leave a comment.