diff --git a/content/en/real_user_monitoring/browser/advanced_configuration.md b/content/en/real_user_monitoring/browser/advanced_configuration.md index fde90172e9a13..6cd14a0ce13a2 100644 --- a/content/en/real_user_monitoring/browser/advanced_configuration.md +++ b/content/en/real_user_monitoring/browser/advanced_configuration.md @@ -552,6 +552,17 @@ You can update the following event properties: The RUM Browser SDK ignores modifications made to event properties not listed above. For more information about event properties, see the [RUM Browser SDK GitHub repository][15]. +**Note**: Unlike other events, view events are sent multiple times to Datadog to reflect the updates occurring during their lifecycle. An update on a previous view event can still be sent while a new view is active. Datadog recommends being mindful of this behavior when modifying the content of a view event. + +```javascript +beforeSend: (event) => { + // discouraged, as the current view name could be applied to both the active view and the previous views + event.view.name = getCurrentViewName() + + // recommended + event.view.name = getViewNameForUrl(event.view.url) +} +``` ### Discard a RUM event With the `beforeSend` API, discard a RUM event by returning `false`: