Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Setting Custom User Action Name with data-dtname


We have an application where we would like to use the html attribute data-dtname to get meaningful user action names. (refer to

Java Script Agent - Action Name Detection ).

The use case is a list of search results where the search tag is highlighted in bold letters. Right now the user action name is gathered from the most inner node the user is clicking on. E.g. in the result list it can be the search tag in bold letters and not the whole result.

Our question is: if we place the data-dtname on a parent node would this attribute value be choosen or is the algorithm starting at the inner node and we need to place the attribute at the most inner node?


Dynatrace Guru
Dynatrace Guru


In the doc you find the priority list of how we detect the name:

  1. attribute named data-dtName
  2. nodeName (e.g. image, anchor, input, ...), returns if html, body or head tag or the document element was found
  3. innerText / textContent

So - if data-dtname is present we will use that as the action name