Dynatrace allows you to define user session properties. Session properties can be leveraged for deep visibility into all the details of your users’ interactions with your application. The sample use case, provided below, shows where you can find the values captured by custom user session properties and how you can take full advantage of these properties.
Filter user sessions by property and property value
The User sessions view offers the option to filter user sessions by a certain property key (name) or value. For example, if you’re running a loyalty program, you can add a property
memberstatus to learn whether a user in a monitored user session is a
Platinum member. You can then filter for
Gold customers in the User sessions view.
Focus on those users who are impacted by a detected problem
Continuing on with the loyalty status example, if there’s a problem detected by our AI, you can drill into the user sessions and look for impacted Gold status customers to whom you may want to provide special services.
The images below show sessions for users impacted by a problem filtered by the property value
Gold. Additional properties gathered for the impacted sessions are also shown.
Gain additional insights with User Sessions Query Language (USQL)
User session properties can greatly improve your analytics capabilities when using the Dynatrace User Sessions Query Language (USQL) for analytics that require advanced filtering, such as multiple filters (see the image below) or persistent filtering across analysis views. Also, when you want to keep track of the monetary values and conversion goals that are key to the success of your business, you can construct queries based on the unique values of the individual user session properties that have been defined for your environment.
Integration via User Session REST API
The Dynatrace REST API, in combination with our User Sessions Query Language (USQL), enables you to access all user session and user action data, including user session properties and values, in the user session detail view.
Extending the loyalty program example above, you can leverage the problem information and loyalty status information to query, via the User Session REST API, the set of user sessions that were impacted by the problem after the problem was closed. This allows you to use the information to, for example, set up personalized marketing campaigns.
Here are some sample queries you may want to leverage:
Gold member user sessions on an application within a certain timeframe—you can leverage this for problems that impact an entire application.
select userId, stringProperties.memberstatus from usersession where stringProperties.memberstatus="Gold" AND userType="REAL_USER" AND useraction.application = "easyTravel Frontend" AND startTime > 1531741985241 AND endTime<1531932305287
Gold member users on a specific application hitting a specific page within a certain timeframe—you can leverage this for problems that impact a specific page.
select userId, stringProperties.memberstatus, useraction.targetUrl FROM usersession where stringProperties.memberstatus="Gold" AND userType="REAL_USER" AND useraction.application = "easyTravel Frontend" AND startTime > 1531741985241 AND endTime<1531932305287 AND useraction.targetUrl="https://easytravel.perform-2018.dynalabs.io/special-offers.jsp"
Dynatrace session properties export
Captured user session properties can be exported, along with all other user session data, within user session export streams. Sessions have been enriched with three additional maps,
dateProperties, which hold the keys and values that are captured during sessions.