06 Jul 2021 12:58 PM
Hi All,
What is the countenance of this metric or properties:
I saw some queries using this parameter but what is the goal and what it contain? useraction.stringProperties.PrblemImpact
Thanks
Solved! Go to Solution.
07 Jul 2021 09:20 PM
This is for when a Problem impacts your customers/users so you are able to filter out the user sessions that are impacted by the problem.
11 Jul 2021 08:14 AM
Thanks @ChadTurner for your feedback.
My question was for the global variable
useraction.stringProperties.* what are the informations that we can retrieve with the stringproperties.
11 Jul 2021 06:34 PM
useractoin.stringProperties.* are user action properties (defined in the application settings) captured by Dynatrace. For web applications, it can have several sources such as CSS selectors, server side request variables, javascript variables...
In general, it allows you to put additional arbitrary metadata for your useractions to be used when analyzing user sessions, generating reports, dashboards or doing user segmentation.
20 Jul 2022 01:45 PM
Do we have hands on examples for this? e.g how to attach JS variable to user action
20 Jul 2022 01:59 PM
@Viachaslau
Just define the action property in the web application like this:
Then the JS variable will be captured at the end of the user action. Keep in mind the key cannot be changed after it's defined and the key/name are global across all web applications.
20 Jul 2022 03:06 PM
Thank you, this dynatrace part and it is pretty clear.
I mean from application code how this bindings works?
can we place just inline var foo = "abc" in button <div> and it will work?
because I see a lot for customisation for dtrum way which I want to avoid:
// LONG PROPERTIES
var long = {long_one: 34234, long_two: 1234567};
function addLongProperties (actionId) {
dtrum.addActionProperties(actionId, long);
}
function addLongPropertiesOnEnter () {
if (typeof dtrum === "undefined") return;
var long = {long_one: 34234, long_two: 1234567};
dtrum.addEnterActionListener(addLongProperties);
loadData();
dtrum.removeEnterActionListener(addLongProperties);
}
20 Jul 2022 03:49 PM
It depends - I'd go with the dtrum.addActionProperties instead of setting global javascript variables, it's better to read the code.
Remember - it must be a global variable. So likely window.foo = 'ABC' will work for you. I used for example window.dt.foo, so I won't abuse much the window object.
20 Jul 2022 03:57 PM
dtrum is as good way but for us will be fallback scenario.
We aim to use only JS vars.
My question how the variable initiation timing affect property detection.
If we assign variable value after XHR request (sometimes we get values from response)
Will it be attached to action, or we should to assign value before onclick/submit?
20 Jul 2022 09:23 PM
It's perfectly safe to get it after the XHR - for example in the callback. It really depends on how the processing is done in the app. If you are using setTimeout for processing, don't forget to enable it in the application definition too.