Define user action and session properties

Dynatrace allows you to define custom properties as well as property packs.

Below you can find the steps for defining such properties as well as related examples. To acquire a deeper understanding of how to use session properties, visit Leverage user session properties.

Note: Currently, Dynatrace supports the definition of session and action properties for web applications only.

Properties can be stored either as user action properties or as user session properties. If you enable the option to store a property as a user session property, the most recent value captured by the RUM JavaScript tag will be stored in the defined property on a session level. If you enable a property to be stored as a user action property, for each user action where the JavaScript tag is able to retrieve the data, the data will be stored in the defined property on the user action level. If you activate both options, the data will be stored in the defined property on both the session and user action levels.

After setting up the properties, you can see them in the multi-dimensional analysis view. Choose the Key Performance metric of your choice, and create a metric.

Property packs

Use property packs to link analytics data to performance insights. You can do this by integrating tools, such as web analytics and performance monitoring, into Dynatrace. Choose from the following property packs:

  • Adobe Analytics
  • Google
  • Intercom
  • Web properties
    Note: In addition to 20 action properties per application, a maximum of 200 properties (session and action) can be defined for an application.

To add a property pack

  1. From the left-hand menu, go to Applications and select your application.
  2. Select the Browse [...] in the top-left corner and choose Edit.
  3. Under Application settings, select Session and user action properties.
  4. Select Add property > Property packs.
  5. From the drop-down list box, select the property pack.
  6. Under Configure properties, select the corresponding Add or Remove button.
  7. Select Next, select the applicable storage type (user session and user property), and then select Create property.
  8. To check your property usage quota, select Session and user action properties under Application settings.
    Note: Currently, up to 20 properties per application can be used free of charge. Additional properties can be licensed with DEM units.

Custom properties

Use custom defined properties to define string, numeric, and date properties for your monitored user actions and 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.

You can define custom user action and session properties that are specific to each application. You can select CSS selector, JavaScript variable, JavaScript API, Meta tag, or Cookie value for the capture type and define whether the data you want to capture is of data type String, Date (available only when capture is done via JavaScript API), or number (Double or Long).

To define a custom property

  1. From the left-hand menu, go to Applications and select your application.
  2. Select the Browse () button in the top left corner and choose Edit.
  3. From the menu on the left, select Session and user action properties.
  4. Select Add property > Custom defined property.
  5. Select the Expression type, Data type, and the applicable String length.
  6. For all expression types, you must specify a Key, which is essentially the name of the property. The Key value is also used to identify and later locate the property in USQL. Allowed characters for Key values are 0-9, a-z, and _. For the JavaScript API, Key is particularly necessary, because if you try to send property data via the JavaScript API without having defined the Key value, the request will be ignored and the property won't appear in the UI.
    Note: A Key that has been used in the past can't be reused as long as the data is retained in your environment. This is because the captured data still references the old session property configuration.
  7. Optional Define a Display name for the property to be used in the UI.
  8. Select the application storage type (user session and user property).
  9. In case you want to restrict the captured values, you can define a clean-up rule for the property by enabling Apply cleanup rule and specifying a regular expression. The regex will be applied to the captured value, which means that if you try to capture a string that is for example 1000 characters long, only the first 100 characters will be captured and the regex will be applied to these 100 characters.
  10. In case you want to restrict the captured values, you can define a clean-up rule for the property by enabling Apply cleanup rule and specifying a regular expression. The regex will be applied to the captured value, which means that if you try to capture a string that is, for example, 1,000 characters long, only the first 100 characters will be captured and the regex will be applied to these 100 characters.
  11. Select Save property.

Examples

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.

    user session properties

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

    user session properties

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

    user session properties

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

    javascript variable example

  • The generic Web property pack is used in the following example to track the marketing campaigns on Dynatrace.com to view:

    • the overall traffic by continent
    • top campaigns by continent
    • the slowest landing experience by marketing campaign

    property packs

Use case

You can integrate Adobe Analytics with Dynatrace to facilitate collaboration among the different teams in your business. To find out how you can do this, visit Tightening the communication within BizDevOps with Adobe Analytics & Dynatrace.

Limitations

  • The number of properties is limited to 10 string, 5 numeric, and 5 date properties per application.
  • Properties in date format will only be available for capture via the RUM and JavaScript API.
  • Property capture begins only after enablement of specific property capture rules.
  • String properties are limited to a 100 characters before applying the clean-up rule.
  • Currently, up to 20 properties per application can be used free of charge. Additional properties can be licensed with DEM units.
  • A maximum of 200 properties can be defined per application.
  • A maximum of 20 action properties can be defined per application.