# custom user action

**URL:** <https://community.dynatrace.com/t/custom-user-action/22095>\
**Category:** Real User Monitoring\
**Tags:** user-sessions, javascript\
**Created:** [September 27, 2019, 5:14am UTC](https://community.dynatrace.com/t/custom-user-action/22095 "2019-09-27T05:14:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [September 27, 2019, 5:14am UTC](https://community.dynatrace.com/t/custom-user-action/22095/1 "2019-09-27T05:14:41Z")

</div>

Hello ,

I want to add custom user actions to be captured for my application . Can some one help me with documents related to same? details given in under the topic is not very detailed "

> Customize Real User Monitoring"

Thankyou..

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [September 27, 2019, 6:13am UTC](https://community.dynatrace.com/t/custom-user-action/22095/2 "2019-09-27T06:13:44Z")

</div>

Just download the API docs and samples from your environment (Settings → Web & mobile monitoring

→ Advanced setup). There are good samples in the zip file that will certainly help you.

---

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [September 27, 2019, 12:27pm UTC](https://community.dynatrace.com/t/custom-user-action/22095/3 "2019-09-27T12:27:14Z")

</div>

Hi Julius ,I have downloaded the docs and sample . but I am still not able to figure out how to change API to add custom actions . For example , I want to capture mouseClick: = “C” .

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [September 27, 2019, 3:43pm UTC](https://community.dynatrace.com/t/custom-user-action/22095/4 "2019-09-27T15:43:02Z")

</div>

You need to call the dtrum JavaScript object methods to capture the action start and end. Can you be more specific in what you are trying to achieve?

---

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [October 1, 2019, 10:00am UTC](https://community.dynatrace.com/t/custom-user-action/22095/5 "2019-10-01T10:00:01Z")

</div>

Hi Julius , I want to capture number of click actions on ‘Finish’ button.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 1, 2019, 12:07pm UTC](https://community.dynatrace.com/t/custom-user-action/22095/6 "2019-10-01T12:07:54Z")

</div>

By design, the click on finish should be a separate user action. Depending on whether the web application does some network requests or not a user action will be automatically created.

If you don’t see user actions triggered by the button click, you need to implement this custom action calls. But nobody will give you more details on how to implement it without a look at the application.

The number of clicks (user actions) can then be retrieved for example by querying the user sessions.

---

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [October 3, 2019, 5:14am UTC](https://community.dynatrace.com/t/custom-user-action/22095/7 "2019-10-03T05:14:14Z")

</div>

Thanks For your reply . I will check further.
