@adobe/helix-rum-js

中文文档
2.17.0发布于 2026/09/17Apache-2.0ES Module零依赖构建来源已验证近 30 天下载 6854

Helix RUM JS

原始使用文档
文档目录10 节
  1. Status
  2. Instrument your website with RUM
  3. Content Security Policy
  4. Testing the setup
  5. Edge Delivery Service Projects
  6. Development
  7. Build
  8. Test
  9. Lint
  10. Releases

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

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

Releases

Releases are performed through Semantic Release in GitHub Actions. The package uses NPM's trusted publishers support, so that NPM will not accept any other package publishers.

版本与发布记录

@adobe/helix-rum-js 共发布 61 个版本,首次发布于 2022/02/19;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.17.0latest2026/09/171 个月前
2.15.32026/06/174 个月前
2.15.22026/06/154 个月前
2.15.12026/06/154 个月前
2.15.02026/05/215 个月前
2.14.42026/05/135 个月前

其他发布通道:release-1.x → 1.9.0。

关于 @adobe/helix-rum-js 的常见问题

@adobe/helix-rum-js 是什么?

Helix RUM JS

如何安装 @adobe/helix-rum-js?

在项目目录运行 npm install @adobe/helix-rum-js,或使用 pnpm add / yarn add / bun add。

@adobe/helix-rum-js 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/adobe__helix-rum-js 是否存在。

@adobe/helix-rum-js 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adobe/helix-rum-js 可以商用吗?

@adobe/helix-rum-js 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@adobe/helix-rum-js 的下载量有多少?

根据 npm 官方下载统计,@adobe/helix-rum-js 在 2026/10/05 – 2026/11/03 这 30 天内被下载 6,854 次,日均约 228 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adobe/helix-rum-js 还在维护吗?

最新版本 2.17.0 发布于 2026/09/17(1 个月前);至今共发布 61 个版本,其中过去 12 个月发布了 11 个;首次发布于 2022/02/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。