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

User action stringProperties

Malaik
DynaMight Champion
DynaMight Champion

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

Sharing Knowledge
9 REPLIES 9

ChadTurner
DynaMight Legend
DynaMight Legend

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. 

-Chad

Malaik
DynaMight Champion
DynaMight Champion

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.

Sharing Knowledge

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.

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

Do we have hands on examples for this? e.g how to attach JS variable to user action

@Viachaslau 
Just define the action property in the web application like this:

Julius_Loman_0-1658321899878.png

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.

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

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);
}



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.

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

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?

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. 

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

Featured Posts