AEM RUM Event Generator for JavaScript
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 the same script but set the status data attribute to 404.
<script defer type="text/javascript" src="https://rum.hlx.page/.rum/@adobe/helix-rum-js@^2/dist/rum-standalone.js" data-status="404"></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
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.
-
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 page -
Open 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
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
$ npm install
$ npm run build-standalone
$ npm test
$ npm run lint