How does Dynatrace track user actions?

Dynatrace Real User Monitoring relies on browser cookies to correlate user interactions in the browser (i.e., user actions) with general page and backend performance metrics.

To track user-initiated transactions across the tiers of your application, Dynatrace uses the x-dynatrace HTTP header.

x-dynatrace header

To track transactions across the tiers of your application that are initiated by user actions, Dynatrace adds the x-dynatrace header to all HTTP requests.

By capturing and analyzing these headers, Dynatrace can track and integrate the flow of transactions with continuous Service flow and PurePath analysis.


Cookies are used to:

  • Monitor site performance
  • Analyze website usage
  • Track user behavior

The data stored in cookies is made up of random values, timestamps, and data that are required to correctly identify the applications in your monitored environment. The real user monitoring JavaScript library must be able to set and modify these cookies. This means that Dynatrace cookies don't support the HTTPOnly flag. Cookies must be included with each request so that user actions can be correlated with backend performance. You can use the Secure cookie flag, however this leads to loss of visibility into any unencrypted HTTP communication.

The following table provides an overview of cookie usage in Dynatrace.

Cookie Structure Expires Max size
dtCookie <randomValue> | <encoded application info> session 100B
dtLatC Measured latency to server session 5B
dtPC <serverID>$<randomValue>_<currentMillis>v<randomValue> session 54B
dtSa* <URL-encoded action name> session max URL length
dtBw <status>_<durationMillis> session 13B
rxVisitor <visitorid> permanent 45B
rxvt <timestamp> | <timestamp> permanent 27B

* The dtSa cookie is used to save user action names, such as Click on Login across different pages. This is required because page loads result in JavaScript code restart and so all contextual information must be stored in cookies.

Session storage

Dynatrace uses sessionStorage to store a backup of rxVisitor and dtCookie because certain browsers delete random cookies when too many cookies are used. Dynatrace sets the following two keys (see the table above for examples):

  • rxVisitor
  • dtCookie

Local storage

Dynatrace uses localStorage to cache the last monitor beacon response, which contains the configuration for the real user monitoring JavaScript library. It doesn't store any user-related data in localStorage. The following table gives an overview of the key/value pairs that Dynatrace writes to local storage.

Key Example value Description
ruxitagentjs__Store OK(nginx) | name=ruxitagentjs | featureHash=2SVfqr | version= | buildNumber=10119170508093112 | lastModification=1494945232091 Beacon response. Configuration for the JavaScript code.