Custom APIs perform different functions including setting dynamic values for user IDs, capturing Javascript (JS) errors, specifying session timeout, and more. Applications Manager provides custom API support to set the username. For this, you have to write a script to capture the username based on the application from cookie, DOM, etc where the username resides. Once the username is captured, you can call our custom API, which will further set the username in RUM. Refer to know more about capturing username in Real User Monitor.
Type | Description | Syntax |
---|---|---|
Capture User Name | By default, a unique user ID is generated by the RUM script for each users. You can implement the provided syntax, to capture username for the user ID. Capture User Name API will be useful when you want to track metrics or debug issues specific to a particular user. | apmr('userName',"user@test.com"); |
Capture Js Errors | Using the provided syntax, Js errors can be manually captured and sent to RUM Agent servers. | try { unKnownFunction(); } catch(err) { apmr('captureException',err); } |
Add Custom Breadcrumbs | "Add Custom Breadcrumbs" API is used to set custom breadcrumbs for easy identification in JS errors. | apmr('addBreadCrumbs',"setTimeoutFunction"); |
End Current User Session | This API will help you to end the current session and start the next page navigation as a new session. You can make use of the given syntax for it. | apmr('endCurrentSession'); |