# RUM Javascript API

**URL:** <https://community.dynatrace.com/t/rum-javascript-api/40691>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, javascript\
**Created:** [July 14, 2023, 1:53am UTC](https://community.dynatrace.com/t/rum-javascript-api/40691 "2023-07-14T01:53:16Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![WeilinT](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@WeilinT](https://community.dynatrace.com/u/WeilinT)\
**Post date:** [July 19, 2023, 1:10am UTC](https://community.dynatrace.com/t/rum-javascript-api/40691/3 "2023-07-19T01:10:35Z")

</div>

Hi Fin\_Ubels,

Thanks for you reply, this is really useful.&nbsp;But i just want to understand a little more:

1. Understand that the javascript snippet is still required, but how does this API works? Does it store these action data as a variable and pass them to Dynatrace using the javascript snippet?

2. Custom user action, from the [documentation (and also appended below)](https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html#enterAction), actionName is not an optional field, but i will still be able to leave it as empty? How will it show up in the Dynatrace portal? like “Click on \<DIV\> on page /home”?

would love to test this out myself, but unfortunately my trial account has expired.

Thanks for your help so far and look forward to hearing back from you.

- enterAction(actionName:&nbsp;string, actionType?:&nbsp;string, startTime?:&nbsp;number, sourceUrl?:&nbsp;string):&nbsp;number

- Enters a new custom action. Use to set the load start event for a new custom action. Needs to be called before&nbsp;[leaveAction](https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html#leaveAction), which closes the custom action.

---

_[View the full topic](https://community.dynatrace.com/t/rum-javascript-api/40691)._
