28 Aug 2023 08:05 AM - last edited on 29 Aug 2023 08:05 AM by MaciejNeumann
Hi all,
I need help to troubleshoot why Custom User Action Not working for {elementIdentifier (default)}
Here are my steps:
But unable to be captured. Thank you.
Regards,
Abner
Solved! Go to Solution.
28 Aug 2023 08:35 AM
Custom actions are action which are created using the JavaScript RUM API with enterAction / leaveAction methods. Dynatrace can automatically capture only user actions (Load or XHR) which trigger a network call. The data-dtname has also effect only on the automatically captured actions (Load or XHR).
28 Aug 2023 09:03 AM
Hi Julius_Loman,
Thanks so much for your answer.
It means the data-dtname is only for Load and XHR.
What happens if there are multiple data-dtname in one page?
Regards,
Abner
28 Aug 2023 08:15 PM
For Load and Xhr actions Dynatrace takes data-dtname attribute on the element the user interacts with. However you might want to use the uanpi custom parameter also for DOM traversal with the limit of parent elements which Dynatrace will look at. Just use a reasonable value such as uanpi=5 to traverse up to 5 parent elements to look for the data-dtname attribute (or a custom name).
11 Sep 2024 07:13 PM
Hi Julius,
How do I set uanpi = 5? Is this a setting somewhere in dynatrace?
12 Sep 2024 07:40 PM
@djpatel9 yes, now it's located in the Web application in Settings > Capturing > Custom configuration properties
17 Sep 2024 05:51 PM
Perfect! Worked like a charm. Are there any attributes we can use to potentially let dynatrace know about a load action? As I understand the data-dtname only works on inputs or clickable items?
19 Sep 2024 07:45 AM
28 Aug 2023 08:38 AM - edited 28 Aug 2023 08:42 AM
Hello, Abner.
You need to use another tab (Load actions/XHR actions) instead Custom Actions.
Applications > App_Name > Settings > User actions (in Capturing)
"Custom Actions" tab is only about instrumented actions with JS API (dtrum)
Regards,
Alex Romanenkov
28 Aug 2023 09:06 AM
Hi Romanenkov_Al3x,
I actually tried it with dtrum using enteraction and leaveaction on my button.
Mr. Julius Loman said, it's only for Load and XHR.
Correct me if I'm wrong but , that I cannot use the Custom with the elementIdentifier?
Regards,
Abner
28 Aug 2023 01:10 PM
No, you can't - because it's not sent, custom action sent instead. So no data for this placeholder.
But you can change your custom action name pattern if want to have a similar view to OOB actions.
28 Aug 2023 08:10 PM
No, custom actions use the name sent using the enterAction method. data-dtname is only for the automatically generated actions (load/xhr).