# Nested custom actions RUM JavaScript

**URL:** <https://community.dynatrace.com/t/nested-custom-actions-rum-javascript/20227>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, javascript\
**Created:** [September 7, 2020, 10:48pm UTC](https://community.dynatrace.com/t/nested-custom-actions-rum-javascript/20227 "2020-09-07T22:48:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego\_Rincon](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@Diego\_Rincon](https://community.dynatrace.com/u/Diego_Rincon)\
**Post date:** [September 7, 2020, 10:48pm UTC](https://community.dynatrace.com/t/nested-custom-actions-rum-javascript/20227/1 "2020-09-07T22:48:30Z")

</div>

I need to report a custom user action the triggers several asynchronous loads on the website. I’ve been taking a look at the dtrum documentation but I haven’t found anything. iOS SDK has the functionality that I’m looking for but I haven’t seen an equivalent for JavaScript.

In iOS it looks like this:

```auto
let childAction = DTXAction.enter(withName: #function, parentAction: parentAction)

```

---

<div class="post-metadata">

**Author:** ![zietho](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/zietho/32/41733_2.png) [@zietho](https://community.dynatrace.com/u/zietho)\
**Post date:** [September 8, 2020, 6:13am UTC](https://community.dynatrace.com/t/nested-custom-actions-rum-javascript/20227/2 "2020-09-08T06:13:01Z")

</div>

Dear Diego,

for XHR actions we usually correlate all subsequent requests in the cascade.

We soon gonna update this info, since we gonna change a bit of logic when “redirects” come into play. I already jotted down to also cover that aspect!

regards

Thomas

---

<div class="post-metadata">

**Author:** ![Diego\_Rincon](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@Diego\_Rincon](https://community.dynatrace.com/u/Diego_Rincon)\
**Post date:** [September 8, 2020, 9:08pm UTC](https://community.dynatrace.com/t/nested-custom-actions-rum-javascript/20227/3 "2020-09-08T21:08:56Z")

</div>

Hi Thomas,

Thank you for your reply. Unfortunately, this is not enough for us. We have several components that have different conditions to be displayed that go beyond the request being successful or not. We have seen some of these failing even though the request was successful. That’s why we need custom actions to track errors in the FE.

Kind regards,

Diego

---

<div class="post-metadata">

**Author:** ![zietho](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/zietho/32/41733_2.png) [@zietho](https://community.dynatrace.com/u/zietho)\
**Post date:** [September 9, 2020, 8:21am UTC](https://community.dynatrace.com/t/nested-custom-actions-rum-javascript/20227/4 "2020-09-09T08:21:48Z")

</div>

Hey, ok I think I now “better” but not fully understood what you want.

Let’s start from actions…

- You can **create your own custom actions** with the RUM JavaScript API, docs you find under YOURENV/ **#settings/rum/advancedsetup;gf=all** or Settings \> Web and mobile monitoring \> Advanced Setup

Then you spoke of “We have seen some of these failing even though the request was successful.”

So, and correct me if I am wrong, you would ideally want to

- **report your own custom errors** of such failing components tied to an action that you created before, which is also possible with the RUM JavaScript API (see docs that I mentioned before)

**All**  **related requests are then correlated** by Dynatrace to such actions.

What I haven’t yet understood is:

- How and why you want to tie child and parent actions to each other, and
- What you would like to see where in the Dynatrace UI as a result
