Safe wrapper for dynatrace.userActions.subscribe which reverts to a noop if RUM JavaScript or the user actions module is not available.
A callback function that is called whenever Dynatrace creates a new user action.
An unsubscriber function to remove the subscription, or undefined if the user actions module is not enabled.
import * as userActions from "@dynatrace/rum-javascript-sdk/api/user-actions";const unsubscribe = userActions.subscribe((userAction) => { console.log('New user action created'); userAction.completeAutomatically = false;});// laterunsubscribe?.(); Copy
import * as userActions from "@dynatrace/rum-javascript-sdk/api/user-actions";const unsubscribe = userActions.subscribe((userAction) => { console.log('New user action created'); userAction.completeAutomatically = false;});// laterunsubscribe?.();
Safe wrapper for dynatrace.userActions.subscribe which reverts to a noop if RUM JavaScript or the user actions module is not available.