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

Custom User Action Not working elementIdentifier

abnerlusung
Advisor

Hi all,

 

I need help to troubleshoot why Custom User Action Not working for {elementIdentifier (default)}

Here are my steps:

  1. I've added the  data-dtname
    <input data-dtname="Firstname Text Input" type="text" value="firstname" name="firstname" title="Firstname" id="txtFirstname" />
  2. Added naming rule for Custom Actions 
    {customActionName (default)} on {elementIdentifier (default)}
    Conditions, {elementIdentifier (default)} contains Firstname

 

But unable to be captured.  Thank you.

 

Regards,

Abner

11 REPLIES 11

Julius_Loman
DynaMight Legend
DynaMight Legend

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).

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

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

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).

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

Hi Julius,

 

How do I set uanpi = 5? Is this a setting somewhere in dynatrace?

@djpatel9 yes, now it's located in the Web application in Settings > Capturing > Custom configuration properties

Julius_Loman_0-1726166402116.png

 



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

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? 

  1. You can change the attribute name and you can use multiple attributes instead of just data-dtname.
  2. If user does not interact with an elemenent - e.g. enters the URL directly in browser or load action happens automatically (redirect?), then you must use either user action naming rule for the Load actions or you must use the dtrum API - actionName to set the name. 

 

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

Romanenkov_Al3x
DynaMight Champion
DynaMight Champion

Hello, Abner.

You need to use another tab (Load actions/XHR actions) instead Custom Actions.

Applications > App_Name > Settings > User actions (in Capturing)

Romanenkov_Al3x_0-1693208427060.png

 

"Custom Actions" tab is only about instrumented actions with JS API (dtrum)

 

Regards,

Alex Romanenkov   

DT_NGINX_FORCE_UNKNOWN_VERSION_INSTRUMENTATION=1

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

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.

No, custom actions use the name sent using the enterAction method. data-dtname is only for the automatically generated actions (load/xhr).

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

Featured Posts