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.

1 REPLY 1

dominik_punz
Dynatrace Pro
Dynatrace Pro

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