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

Override User Actions


Hi Team,


We are trying to add the auto instrumentation to our application and observed one issue on Data leakage.


we have list of names and phone numbers, when user clicks on the name and phone number we are performing actions to navigate to another screen, at this time Dynatrace is seding the click action along with the Name and phone number.


if we add the custom action at click listener then user action is overriding and its not sending the name and phone number, but we are having different scenarios where the custom data is captured by on click and sending in to dashboard.


is there anything we can do in common place to override the user actions and whenever its taking the data it should not send the customer data to dashboard or any other way to handle this.


Can someone help us on this.





DynaMight Legend
DynaMight Legend

I assume your question is about a mobile application. Depending on your case, it is possible to use the user action naming rules for your mobile application. Data will still be captured, but the user action rules can clean them for you.


Be sure to check the options how to modify the detected user action including name . However it could be tricky or impossible to do it in general for complex applications.

Also, you might want to exclude some classes, so the autoinstrumentation will not instrument them and you won't have a user action. For example - entering a PIN number to unlock an application is typically something you don't want to see.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Dynatrace Helper
Dynatrace Helper

Are you talking about a web or mobile application?

For web applications you can add an attribute to the elements called "data-dtname"(you can actually define how the attribute is called in the configuration).  If this attribute is available, it will have highest priority and you can e.g. override the phone number "555-1234" with "phone number".
Documentation is here: for "data-dtname")

There is also the "Mask user actions" option for an application, but this will apply to ALL actions, which is probably not what you want.

I've seen this in the docs as well and can't quite get this to work like I want. 

Essentially I have an list element <li> with the data-dtname. But there is a <div><a><span> nested inside of it and it seems to only pick up the element identifier in these elements and not back up to the <li> element. Any way to fix this. Essentially I want anytime someone clicks in this element that has the custom data attribute for that to be logged. Currently the only way I can accomplish this is to use the api. It would be much cleaner code wise if I could get this to work.

If you go to application settings --> capturing --> advanced setup --> custom configuration properties you can enter "uanpi=<level>", where <level> is a number how many levels upwards we are searching for the data-dtname (or whatever you have configured as an alternative for it) attribute.
If you are saying you have <li><div><a><span>, then <level> should be 3 and therefore the config should say "uanpi=3"(if you already have something there, concatenate with "|" as described above the textfield)

Don't set it too high though, because the iteration does not come for free and if you enter crazy numbers it might cause a lot of slowdown.

"Don't set it too high though, because the iteration does not come for free and if you enter crazy numbers it might cause a lot of slowdown." - Slowdown on the client app? What would you consider a crazy number. I was thinking to cover most cases putting 10. I'm assuming in the logic of this it searches for it in each node above...and if it finds the custom attribute it stops. But still not wanting to put anything to high here. I think 10 would cover most cases

I think 10 should be fine. I just added that as a disclaimer, sometimes people operate on the principle "vü hüft vü" (austrian for "a lot helps a lot") and they would just put 1000 in there to be on the safe side and are surprised that things slow down.

Featured Posts