Header background

Filter user sessions based on custom session properties (EAP)

Dynatrace is pleased to announce the Early Access Program (EAP) for enhanced user session properties in Real User Monitoring (RUM). You can now configure custom string, numeric, and date properties for your monitored user sessions; property values are then captured as part of each of your users’ journeys. Property values can be leveraged for unrivaled visibility into all the details of your users’ interactions with your application.

This EAP requires customer signup—to participate, please contact Klaus Enzenhofer or Alexander Sommer.

With this first release of user session properties, we’ve enabled a whole new set of use cases. The following is a sample use case that 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

User sessions view enables you to filter for sessions that have 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 Silver, Gold, or Platinum member. You can then filter for Platinum or Gold customers in User sessions view.

User session filtered for loyalty status

Focus on those users who are impacted by a detected problem

Continuing on with the loyalty status example above, 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.

List of gold member customers impacted by a certain problem

Individual gold customer impacted by a certain problem with other session properties captured during his session

Integration via User Session REST API

The Dynatrace REST API, in combination with our new User Session 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.

Expanding on 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 leverage 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 one 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 user session export

Captured user session properties can be exported, along with all other user session data, within user session export streams. Sessions now have three additional maps, stringPropertiesnumProperties, and dateProperties, which hold the keys and values that are captured during sessions.

Define session properties

User session properties are specific to each application. In the settings for your application (Applications > YourApplication > Browse [] > Edit), you’ll find a new top-level navigation item called Session properties.

Note: Currently, Dynatrace supports defining session properties for web applications only.

After selecting Add session property rule, select Meta tag, JavaScript variable, Cookie value, or CSS selector for the capture type. You need to define whether the data you want to capture is of data type String, Number, or Date. The Key you specify will be used throughout the UI and API when you want to leverage the property. The definition of the capture expression depends on the selected capture type and can be a Meta tag name, JavaScript variable, a Cookie value, or a CSS selector.

Here are some sample definitions that work for our easyTravel Customer Frontend sample application. In this example, the property member_status captures loyalty program membership status.

Configruation to capture the loyalty status in the easyTravel UI

The numeric property averagepersonprice captures the average price per person of a journey booked using easyTravel.

Configuration to capture the average person price of a journey booked on easyTravel

The property author captures the name of the developer of the easyTravel application from a metadata tag.

Configuration to capture the web app author of easyTravel via meta-tag rule

In the example below, a JavaScript string variable captures the user’s appversion during the session.

Configuration to capture the easyTravel app version the user was on during his session

Known limitations

  • The number of session properties is limited to 10 string, 5 numeric, and 5 date properties per application.
  • In the final release, properties in date format will only be available for capture via the RUM and JavaScript API.
  • Property capture begins only after enablement of specific session property capture rules.

Upcoming improvements

  • Option to send captured property data via the RUM and JavaScript API
  • Option to leverage server-side request attributes in the configuration of session property rules
  • Capture of user action properties for ad-hoc analysis in multi-dimensional user action performance analysis
  • Support for user session properties for mobile apps and OpenKit for RUM applications