@adobe/helix-rum-js
v2.8.0
Published
Helix RUM JS
Downloads
171,182
Maintainers
Keywords
Readme
AEM RUM JS
AEM RUM Event Generator for JavaScript
Status
Instrument your website with RUM
If your website is not built using AEM Edge Delivery Services it is recommended to setup RUM in standalone mode.
To do it, simply add the following script to your pages.
<script defer type="text/javascript" src="https://rum.hlx.page/.rum/@adobe/helix-rum-js@^2/dist/rum-standalone.js"></script>
If you want to instruct a 404 response, include this script instead in standalone mode.
<script defer type="text/javascript" src="https://rum.hlx.page/.rum/@adobe/helix-rum-js@^2/dist/rum-standalone-404.js"></script>
If you understand the details of a high performance page, it might be advisable to load the script after the LCP event
Check the following link for advanced configuration options.
Also, you can instrument your website with RUM using Google Tag Manager
Content Security Policy
If your website implements a Content Security Policy it is important to ensure
that the origin https://rum.hlx.page
is allowed both as a script source and as a destination for navigator.sendBeacon
API.
Testing the setup
Access a page of your website where you have included the RUM script.
Adding to the url the request parameter
rum=on
and reload the pageOpen browser console and check that
ping
messages are being written.Open the network tab of your browser and validate that ping requests using
POST
method to domainrum.hlx.page
are being sent and that the response status is201
Edge Delivery Service Projects
Note that websites implemented with Adobe Edge Delivery Services, based on the boilerplate are already instrumented with RUM.
For more details about RUM in Edge Delivery Projects, upgrading from previous versions of RUM, or customization options, you can check the page RUM in Edge Delivery Services projects
Development
Build
$ npm install
Build standalone
$ npm run build-standalone
Test
$ npm test
Lint
$ npm run lint