Skip to content

adobe/helix-rum-js

AEM RUM JS

AEM RUM Event Generator for JavaScript

Status

codecov GitHub Actions GitHub license GitHub issues semantic-release

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 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.

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

  1. Access a page of your website where you have included the RUM script.

  2. Adding to the url the request parameter rum=on and reload the page

  3. Open browser console and check that ping messages are being written.

    ping-messages-in-console

  4. Open the network tab of your browser and validate that ping requests using POST method to domain rum.hlx.page are being sent and that the response status is 201

    rum-requests-in-network-tab

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