Skip to content

Custom Data and Events

The Browser RUM SDK automatically collects View, Resource, Error, and User Actions. Only when you need to associate a logged-in user, add business dimensions, or actively record business events do you need to call the public APIs in this section.

Choose an API

Goal API Description
Associate logged-in user setUser(), clearUser() Custom User ID
Add business dimensions to all subsequent RUM events setGlobalContextProperty(), setGlobalContext() Global Context
Actively record business operations addAction() Add Custom Action
Report exceptions caught or identified by business logic addError() Report Custom Error

Usage Guidelines

  1. First complete Web Application Setup and confirm that basic View data has been reported.
  2. User ID, Context key, and Action name should use stable values. Avoid high-cardinality data such as order numbers entering the name fields.
  3. Do not report sensitive information such as passwords, tokens, or full ID numbers.
  4. When loading asynchronously via CDN, call APIs through DATAFLUX_RUM.onReady() to avoid the SDK not being fully loaded.

Feedback

Is this page helpful?