From 92275b3a84e08f75856aa4b5b87183b402dee709 Mon Sep 17 00:00:00 2001 From: Bastien Caudan Date: Tue, 6 Jul 2021 10:27:43 +0200 Subject: [PATCH 1/3] [RUM] document `actionNameAttribute` usage --- .../browser/tracking_user_actions.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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..afe39e8d94579 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,22 @@ 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 will be used to name the action. For example: + +```html + + +Try it out! +``` + ## 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 +161,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 From 0c29b7e59e4be5271fb2a377b52d7d14d8e24106 Mon Sep 17 00:00:00 2001 From: Bastien Caudan Date: Tue, 6 Jul 2021 11:00:28 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=91=8C=20add=20note=20about=20attribu?= =?UTF-8?q?te=20priority?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../en/real_user_monitoring/browser/tracking_user_actions.md | 2 ++ 1 file changed, 2 insertions(+) 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 afe39e8d94579..bfe0914121a7e 100644 --- a/content/en/real_user_monitoring/browser/tracking_user_actions.md +++ b/content/en/real_user_monitoring/browser/tracking_user_actions.md @@ -91,6 +91,8 @@ Starting with [version 2.16.0][3], with the `actionNameAttribute` initialization 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. From d2b3b1989fe485eff6f35558d03f6739507b0fb3 Mon Sep 17 00:00:00 2001 From: cswatt Date: Tue, 6 Jul 2021 12:38:33 -0400 Subject: [PATCH 3/3] Update content/en/real_user_monitoring/browser/tracking_user_actions.md --- .../en/real_user_monitoring/browser/tracking_user_actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bfe0914121a7e..9a14ecd7b7139 100644 --- a/content/en/real_user_monitoring/browser/tracking_user_actions.md +++ b/content/en/real_user_monitoring/browser/tracking_user_actions.md @@ -76,7 +76,7 @@ The RUM library uses various strategies to get a name for click actions. If you ``` -Starting with [version 2.16.0][3], with the `actionNameAttribute` initialization parameter, you can specify your own attribute that will be used to name the action. For example: +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