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

User tag - JavaScript Selector

urs_fischer
Helper

Hi,

I have an Application where i have the Login Name for User Tagging in the Variable localStorage["ls.user.userId"]. If i want to put that into the JavaScript Variable, i am not able to put it in because of the "[]" (Message from Dynatrace: "Not supported JavaScript expression! ").

Do you now a way to put this localStorage Variable into Dynatrace Managed?

Thanks for your Help, Urs

2 REPLIES 2

skrystosik
DynaMight Guru
DynaMight Guru

Try yo use it that way localStorage.ls.user.userId Such notation localStorage.<yourvariablename> is working in browsers as well and should work in DT as well. What I'm concerned about are dots in variable name. If this will not work, unfortunately it is not possible to use localStorage.

Here is RFE with explenation:

https://community.dynatrace.com/spaces/483/dynatrace-product-ideas/idea/196143/user-tag-from-localst...

Sebastian

Regards, Sebastian

Thanks Sebastian. Yes, the dots are right now my problem...

Featured Posts