diff --git a/content/en/real_user_monitoring/browser/tracking_user_actions.md b/content/en/real_user_monitoring/browser/tracking_user_actions.md index ab2b6941f629c..9a14ecd7b7139 100644 --- a/content/en/real_user_monitoring/browser/tracking_user_actions.md +++ b/content/en/real_user_monitoring/browser/tracking_user_actions.md @@ -20,7 +20,7 @@ further_reading: --- -Real User Monitoring (RUM) Browser SDK automatically detects user interactions performed during a user journey. +Real User Monitoring (RUM) Browser SDK automatically detects user interactions performed during a user journey. The automatic collection of user actions provides insights into user behavior, without having to manually instrument every single click in your application. It helps you achieve the following objectives: * Understand the performance of key interactions (for example, a click on the "Add to cart" button) @@ -75,6 +75,24 @@ The RUM library uses various strategies to get a name for click actions. If you Enter a valid email address ``` + +Starting with [version 2.16.0][3], with the `actionNameAttribute` initialization parameter, you can specify your own attribute that is used to name the action. For example: + +```html + + +Try it out! +``` + +**Note**: `data-dd-action-name` is favored when both attributes are present on an element. + ## Custom actions Custom actions are user actions declared and sent manually by using the `addAction` API. They are used to send information relative to an event occurring during a user journey. In the following example, the RUM SDK collects a visitor's cart data when they hit the checkout button. The number of items within the cart, the list of items, and how much the cart is worth overall are collected. @@ -145,3 +163,4 @@ window.DD_RUM && [1]: /real_user_monitoring/browser/modifying_data_and_context/ [2]: /real_user_monitoring/browser/data_collected/#default-attributes +[3]: https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md#v2160