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