# using data-dtname for user action names

**URL:** <https://community.dynatrace.com/t/using-data-dtname-for-user-action-names/32765>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, user-actions\
**Created:** [September 22, 2021, 1:09pm UTC](https://community.dynatrace.com/t/using-data-dtname-for-user-action-names/32765 "2021-09-22T13:09:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![graham\_dalessan](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@graham\_dalessan](https://community.dynatrace.com/u/graham_dalessan)\
**Post date:** [September 22, 2021, 1:09pm UTC](https://community.dynatrace.com/t/using-data-dtname-for-user-action-names/32765/1 "2021-09-22T13:09:16Z")

</div>

I am struggling to use the **data-dtname** attribute to customize my action names.&nbsp; According to the documentation [here](https://www.dynatrace.com/support/help/shortlink/user-actions#action-name-detection) it seems all that is required is to add the **data-dtname** to the HTML element.&nbsp; After that attribute is added we should automatically (without any further action) start to see the **data-dtname** as the action name.

Is there another step that is required to get this to work?

Here is an example of the HTML element:

\<button class=“button btn-new-order” id=“neworderid” ng-click=“ctl.enterOrder()” data-dtname=“New Order Form”\>  
\<i class=“bolt-icons”\>add\</i\>  
\<span class=“btn-new-order-text”\>New Order Form\</span\>  
\</button\>

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [October 27, 2021, 8:01pm UTC](https://community.dynatrace.com/t/using-data-dtname-for-user-action-names/32765/2 "2021-10-27T20:01:38Z")

</div>

[@graham\_dalessan](https://community.dynatrace.com/user/2920)&nbsp;were you able to get a resolution or more information on this?

---

<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:** [November 8, 2021, 2:32pm UTC](https://community.dynatrace.com/t/using-data-dtname-for-user-action-names/32765/3 "2021-11-08T14:32:33Z")

</div>

[@graham\_dalessan](https://community.dynatrace.com/user/2920)&nbsp;I believe you need that on the innermost element.

There is already a [RFE for enhancement - DOM traversal](https://community.dynatrace.com/post/162575).
