The new name of the action
The action ID of the to be updated action name
an ActionNameResult whether the process was successful
Adds custom action properties
to the currently active action.
Only accepts valid java long, java double (as a string representation), Date objects, and
short strings with a maximum length of 100 characters.
Action properties must be defined first under Application settings and use a lower case key.
ID of the action.
JSON object containing key value pairs of valid numbers.
Value should be between
range -9223372036854776000 & 9223372036854776000
JSON object containing key value pairs of JavaScript Date objects.
Value should be JavaScript Date object
JSON object containing key value pairs of strings.
Value character count should be less
than 100 characters
JSON object containing key value pairs of valid floating point numbers.
Value should be between range -1.7976931348623157e+308 & 1.7976931348623157e+308
Each key value pair must be defined in the following format 'key: { value: value<AllowedMapTypes>, public?: boolean }'
Public property is optional and if not declared as true values will be sent as masked(dT_pv) in doNotTrack mode
Attaches a listener that gets called while entering an action
Remove the listener if not needed or make sure to filter actions if using addActionProperties,
to prevent sending the same action property for every action.
Use to hook into automatic action creation event to influence related concepts like
action naming or action properties.
A function that will be called when entering a new action
Attaches a listener that gets called when leaving an action
Remove the listener if not needed or make sure to filter actions if using addActionProperties,
to prevent sending the same action property for every action.
Use to hook into the out of the box action closing event.
A function that will be called when leaving an action
Adds a listener that is called when the user is leaving the page, but before the RUM monitoring beacon is sent Use when you want to hook into the unload of the page.
A function that will be called in case the user leaves the page
Adds a listener that gets triggered when the current visit times out and before a new visit id is generted.
The listener to add
Indicates the start of a user input. User inputs must always be stopped by calling endUserInput. If an XHR call or a page load happens, the RUM monitoring code checks if a user input is active. If so, that user input is set to have triggered the user action. Use when a user input is not automatically detected by the RUM monitoring code.
DOM node which triggered the action (button, etc) or a string is used for determining its caption
Type of action: 'click', 'keypress', 'scroll',...
Additional info for user input such as key, mouse button, etc ('F5', 'RETURN',...)
How long this userInput should be valid(in ms)
An object containing all the information about the userInput
Disables the RUM monitoring code and removes all cookies in case dtrum.enable() has been called earlier, enabling the opt-in mode. Use in combination with a user consent tool to disable RUM monitoring in case the consent has not been provided.
Removes all traces of persistent values and disables all functionality that would recreate one. Note that this has to be called on every page, since it removes persistent RUM monitoring data, including the information that persistent data shouldn't be stored. Use when you want to disable monitoring of returning users. Read more about cookie storage.
If true, this configuration state is persisted in local storage, so that it doesn't reset on each page load
Disables session replay
Enables the RUM monitoring code in case it was initially disabled via the opt-in mode. Use in combination with a user consent tool to enable RUM monitoring in case the consent has been provided.
Enables manual page detection. After this is called the RUM monitoring code will stop detecting page and page group names automatically and only accepts them via setPage. It is recommended to call this as early as possible.
Enables persistent values again. Only applies if 'disablePersistentValues' has been called previously. Use when you want to re-enable monitoring returning users.
Enables session replay
Allows to enable session replay despite cost control configuration
Ends the currently active session immediately.
Ends a user input.
The user input object returned by beginUserInput
Enters a new custom action. Use to set the load start event for a new custom action. Needs to be called before leaveAction, which closes the custom action.
Name of the action
DEPRECATED: not used any more and has no effect if provided
Timestamp in milliseconds. if null, current time is used.
Source url for the action
ID of the created action
Extends or initiates actions. Use when you want to extend an active Load or XHR action by another unlinked XHR call (i.e., action). This is particularly useful when the XHR call in question is asynchronous in nature and therefore can't automatically be correlated to an action, which otherwise would lead to the action being closed too early and inaccurate metrics measurements (e.g., user action duration). Needs to be called before leaveXhrAction.
Optional additional info about type of XHR (e.g., framework name, etc.)
XHR action creation mode 0 ... Just extend running XHR actions 1 ... Extend any running action 3 ... Start action if user input is present
url of the requested resource
note that in the future, this argument will be required
if not provided, the request will be marked as /undefined
in the waterfall
ID of the XhrAction
Indicates that an XHR callback is active (eg. XMLHttpRequest onreadystatechange) and relinks subsequently triggered XHR actions. For example, when an XHR callback adds a script tag to your page, any XHR call triggered by it would not be automatically added to the currently running action. Calling this function allows relinking to such a subsequent XHR call (i.e., XHR actions) to its initial action. The XHR callback must also be stopped by leaveXhrCallback.
ID of the action where callback belongs to
Get and evaluate meta-data for the page. Use to troubleshoot RUM monitoring.
Array of metadata objects with configured ids, type, expression, and captured values
Sets the user tag. Use to identify individual users across different browsers, devices, and user sessions.
The name of the user. For example, use a name, userid, or your user's email address.
Signals that the load end event is provided manually. Use when you want to extend the onload duration (e.g. to encompass also the initialization of a framework)
Leaves an action that has previously been created by an enterAction call. Use to set the load end event for a custom action and to complete its creation. Needs to be called after enterAction.
ID of the action to leave. must be the value returned by enterAction
Timestamp in milliseconds. Note that, when providing a stop time, it will force stop the action and prevent visually complete from extending it.
Optional start time in milliseconds (necessary if start time should be modified). Note that, when providing a start time, it mustn't be longer than an hour in the past, otherwise the RUM monitoring code will ignore it.
Indicates the end of an XHR action
ID of the XHR Action
Indicates the end of an XHR callback.
ID of the action where callback belongs to
Report the HTTP status code and a custom message for the response of the current page. For example, use to mark your 404 pages that respond with a HTTP status code of 200. Needs to be called before the onload event of the page has finished, otherwise the information will be discarded.
Sets the HTTP status code
An additional informational message
false if the values were incorrect or the function has been called too late, true otherwise
Reports the HTTP status code and an additional message for the response of the current XHR action. For example, use when the HTTP status code of your XHR response returns 200, while the result returned by the server indicates a failed request. Needs to be called before the XHR action is finished and all listeners have been invoked.
The response code of the current XHR action
An additional informational message
The optional ID of the action to mark as failed. If it is not present, the currently open action is used.
false if the values were incorrect or the function has been called too late, true otherwise
Returns the current time in milliseconds. It automatically chooses the most accurate way to determine the current time.
the current time in milliseconds
Registers a method which will be invoked before the 'diff' action in session replay during recording.
Listener which will be called before diff action. Listener receives one argument which is a string with diff. Listener also must return the diff string. Read more about cookie storage.
Removes a previously attached listener that detects the enter action event
The reference to the listener that needs to be removed
Removes a previously attached listener that detects the leave action event
A leave action listener to be removed
Report your owncustom errors. For example, use when you want to capture form validation errors in your signup process. Custom errors must first be defined in the Application settings.
The key of the error. For example, 'validation error'
The error value. For example, 'Email validation failed'
A hint to pinpoint the problem, e.g. content of the input element which triggered the failed validation
How the custom error should be attached (default = false), [case number]: To which open action the custom error event should be attached, [case boolean]: If true it will get attached to the current active action
Reports an error object to Dynatrace. Use when you catch errors in your own application code but you also want to propagate them to Dynatrace instead of logging them yourself. If errors are handled by your own application code it will stop the error from being handled by the global JavaScript onerror event handler, which is used by Dynatrace to automatically capture JavaScritp errors.
The error to be reported. Any browser error object is supported and if the error doesn't have a stacktrace the RUM JavaScipt monitoring code will attempt to generate one. Alternatively create your own object that has the following properties set: 'message', 'file', 'line', 'column', and 'stack'. The 'message' property must be provided; all other values are optional.
parent action id. if not passed or null, error is added to current action
Forces beacon sending to make sure actions aren't lost. For example, use before a window unload event by adding a addPageLeavingListener.
Force synchronous sending of beacons. If false, the beacon will be sent asynchronously.
Force sending of preview beacons which haven't been closed yet.
Kills unfinished actions and sends them immediately. Handle with care, actions might be inaccurate.
Sends session properties on a beacon
currently only accepts valid java long, java double (as a string representation), Date objects, and short strings of
a maximum length of 100 characters.
NOTE: session properties need to have a lower case key!
Make sure to first define session properties under Application settings before making this API call.
JSON object containing key value pairs of valid numbers.
Value should be between range -9223372036854776000 & 9223372036854776000
JSON object containing key value pairs of JavaScript date objects.
Value should be JavaScript Date object
JSON object containing key value pairs of strings.
Value character count should be less than
100 characters
JSON object containing key value pairs of valid floating point numbers.
Value should be between range -1.7976931348623157e+308 & 1.7976931348623157e+308
Each key value pair must be defined in the following format 'key: { value: value<AllowedMapTypes>, public?: boolean }'
Public property is optional and if not declared as true values will be sent as masked(dT_pv) in doNotTrack mode
Status report about properties that were passed to the function. It contains data about failed properties with the failure reason. Contains data about properties that were sent successfully and a general message with information about total failed properties.
Enables/disables automatic action detection. Use when you want to instrument your application only manually.
Whether automatic action detection should be enabled or disabled
Tells the RUM monitoring code to not automatically detect the load end event. The load end event must be set explicitly via signalLoadEnd. Needs to be called immediately after the RUM monitoring code is injected!
Starts a new page view and reports it to dynatrace server.
New page containing page name and page group.
1 if new page is started succesfully. 2 if new page is started during onload. It means it is cached and will be sent with load action. - 1 if page that is being set is the same as previous one. - 2 if page is trying to be set but mechanism is not active. Probably 'dtrum.enableManualPageDetection()' was not called. Negative number means new page failed to start and positive means that new page is started successfully.
Signals that the page has finished loading. Use in combination with setLoadEndManually to define your own load end times.
Indicates the end of a load action. needs incrementOnLoadEndMarkers to be called before. When the last signalOnLoadEnd is called, the action is closed.
Indicates the start of a load action. Frameworks often have their own load callback functions this can be used when framework starts load before 'DOMContentLoaded'.
Generated using TypeDoc
Sets the actionName of the currently active action, or the action with the provided id