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

Any way to use form data to identify users for Dynatrace User Sessions?

richard_davis
Newcomer

Our application uses an HTML Input tag with a name of j_username on our login page. Is there any way to use the content of this element to identify users in the User Session view? I tried adding it as a javascript variable but the user was then identified as [object HTMLInputElement]. It really needs to access the .value property of the element in the DOM.

3 REPLIES 3

dominik_punz
Dynatrace Champion
Dynatrace Champion

You should be able to use a css selector and get the attribute by using "@", just as described in the hint text below.

So in your case #j_username@value should work (in case the ID is set).

However I do not think it is a good idea to query this value as it might change dynamically, users might mistype their names and try to login and you'll end up with all sorts of incorrect usernames in Dynatrace.

It would be better to use the JS API to report the actual name after the login was successful.

Dominik

Ignacio_Carrasq
Participant

HI @richard_davis , I have exacly the same question from your post, where you able to solve it ?
is there any Tip that you can share with me ?

@Ignacio_Carrasqif your server side is monitored by OneAgent, you can use request attribute to capture the value when the form data is posted and then set it as the user tag source as described here.

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