Action (RUM)
An action (RUM Action) is an event recorded by Datadog RUM for a single user interaction. Besides the browser SDK automatically capturing clicks, the application can also send its own custom interactions, and signs of frustration are attached to actions as markers.
Overview
An action is a record, one item at a time, of an interaction such as a click that a user performed within a view. It is the unit for reading which interaction is slow to load, how much a new feature has been used, and what was pressed on the way to an error. Because the SDK builds action names from screen elements, this is also the concept to keep in mind when problems arise such as unreadable names, personal information mixed into names, or the same button being split across different names. Markers for interactions that indicate frustration are also attached on the action side, so actions are also an entry point when looking for screens that are hard to use.
One interaction within a view becomes one item
The browser RUM SDK captures user clicks and creates click actions. One item roughly corresponds to one click, but repeated presses on the same element are combined into one item (as of October 2026; Source: Tracking User Actions). Each action holds, as its loading time, the time until activity on the screen stops after the interaction, and it also counts the number of errors and resources that occurred during that time. How activity on the screen is judged is left to View (RUM), and how views and actions are arranged under a Session (RUM) is left to the explanation of sessions.
Names are looked for in the order of attribute, label, and text
When you specify trackUserInteractions: true in the SDK initialization, clicks are captured automatically. A captured click gets a readable name such as Click on #checkout in action.name, and the SDK builds this name in the following order (as of October 2026; Source: Tracking User Actions).
- If the pressed element or a parent has a name attribute such as
data-dd-action-name, its value - If there is no attribute and the setting to mask names is enabled,
Masked Element - If neither applies, the
label/placeholder/aria-labelof the element or a parent - If there is none of those either, the text inside the element
In the last step, the wording displayed on the screen becomes the name as is. For elements you want to give a name that is not affected by the wording, you can decide it in advance with the attribute in the first step.
Which wins, renaming or masking?
If you decide the name yourself, write a data-dd-action-name attribute on the pressed element or its parent. If you want to use an existing attribute name, you can specify a different attribute with actionNameAttribute in the initialization, a setting introduced in SDK 2.16.0. On an element with both, data-dd-action-name takes precedence. Because the name indicates the element that was interacted with, sensitive information on the page can end up in the name. If you therefore enable enablePrivacyForActionName, all names are replaced with Masked Element. However, names set explicitly with the attribute remain unmasked (as of October 2026; Source: Tracking User Actions). You can also take the order of turning on the masking setting first and then naming only the interactions that are acceptable to show.
What do the three types of frustration signals count?
Actions can carry three types of markers that indicate moments when a user became frustrated. A Rage Click is attached when, counting over a sliding 1-second window, the same element is pressed more than 3 times. A Dead Click is when a user presses a static element that produces no movement at all on the screen, and an Error Click is when a JavaScript error occurs immediately after the press. All of these markers are created from mouse clicks and are not attached for keyboard interactions. Collecting them requires SDK 4.14.0 or later, and from v5.0.0, simply enabling trackUserInteractions collects all three types (as of October 2026; Source: Frustration Signals). In RUM Explorer, you can filter marked interactions with action.frustration.type:rage_click. Marked actions also appear on the timeline in Session Replay, so you can check the screen at the moment of the press in the recording.
Send events other than clicks with addAction
When you want to leave events that cannot be captured as clicks in the flow of user behavior, send custom actions with the addAction API. A custom action has action.type set to custom, and its name is the value passed in the call (as of October 2026; Source: Tracking User Actions). Automatic clicks and custom actions can be read separately by type. In your own RUM application, sort action.name by count in descending order, and if long names built from inner text or differently worded versions of the same button are near the top, those are the first candidates for fixing names with the attribute.