15 Jun 2018 01:32 PM - last edited on 30 Sep 2022 01:13 PM by MaciejNeumann
Can we use XHR request payload values for user name taggin? If so, what would the configuration look like? Thanks
Solved! Go to Solution.
15 Jun 2018 01:39 PM
Hi Matthew,
if the user name is loaded into a JavaScript Variable you may be able to retrieve it from there.
Another possibility is using the JavaScript API and calling dtrum.identifyUser() after the request.
best regards
Franz
15 Jun 2018 01:47 PM
Would this be considered a JavaScript Variable?
15 Jun 2018 02:55 PM
Which kind of Storage is this? It looks like Local or Session Storage. That is of course accessible by Javascript functions but I don't think Dynatrace accepts a function call here.
20 Jun 2018 03:37 PM
Unfortunately you can't use the payload of an XHR Request for tagging.
If the value is not available via a CSS selector, Cookie, JavaScript variable or a Meta Tag, the only way is to use the JavaScript API to set the user tag. If you choose that route be sure to evalute if the agent is loaded before performing the call to identify the user.