Try it free

Cookies and client-side storage for RUM and Session Replay

  • Latest Dynatrace
  • Reference

Both RUM Classic and RUM on the latest Dynatrace rely on HTTP headers, cookies, web storage, and IndexedDB. The headers used are listed in Infrastructure pass-through requirements for RUM. This page describes the cookies, web storage, and IndexedDB entries used.

Cookies, web storage, and IndexedDB are used for the following purposes:

  • Aggregation of user sessions
  • Identification of recurring users
  • Persisting the state of RUM features like cost and traffic control
  • Correlation of user actions with their server-side traces in RUM Classic
  • Keeping the Session Replay recording consistent across pages
  • Caching Session Replay resource capture data to avoid redundant uploads

The data stored in cookies, web storage, and IndexedDB contains no personal or sensitive data. It consists of random IDs, timestamps, boolean flags, configuration, hashes, and cached resources.

Cookies

The following table provides an overview of the cookies used in RUM, RUM Classic, and Session Replay. These are all first-party cookies.

The <environmentID> suffix used in the cookie names is explained in Suffix for cookie names and web storage keys.

The v4 cookie format mentioned in the table consists of key-value pairs, for example v_4_srv_7_sn_4D3133F359A76AB05AAF39691696858A. Don't filter for any of these keys, because they may change.

CookieStructureExpiresMax sizePurpose

dtCookie<environmentID>

v4 cookie format

Session

No set limitation, but usually less than 100 B

Tracks a visit across multiple requests.

dtPC<environmentID>

<serverID>$<randomValue>_<currentMillis>v<randomValue>e<eventCount>

Session

58 B

Required for routing RUM beacons; includes session ID for user session aggregation.

dtSa<environmentID>

<URL-encoded action name>

Session

Max number of characters in the URL

Serves as an intermediate storage for page-spanning actions. This 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, so all contextual information must be stored in cookies.

dtValidationCookie<environmentID>

The string dTValidationCookieValue.

Deleted after a few milliseconds; no expiry date set

Length of the string dTValidationCookieValue, that is 23

Used to determine the top-level domain.

rxVisitor<environmentID>

<visitorID>

Session, or permanent if user tracking is turned on

45 B

Contains the visitor ID to correlate sessions.

rxvt<environmentID>

<timestamp>|<timestamp>

Session

27 B

Stores the session timeout.

dtsrVID<environmentID> 1

<viewID>

Session

20 B

If Session Replay is enabled, dtsrVID stores the ID of the current recorded view.

dtSR<environmentID> 2

v4 cookie format

Session

81 B

If Session Replay is enabled, stores the required values to keep the recording consistent across pages.

1

The dtsrVID cookie exists from RUM JavaScript version 1.325+ to RUM JavaScript version 1.333.

2

The optional dtSR cookie is available from RUM JavaScript version 1.335+.

Cookies on upgraded environments

Once an environment has been upgraded to Latest Dynatrace, RUM sets the additional first-party cookies described in the table below. To identify and resolve any compatibility issues with your infrastructure before upgrading the environment, you can also upgrade only the RUM cookies.

CookieStructureExpiresMax sizePurpose

dtUSR_<environmentID>

v4 cookie format

Session, or two years from the last access if user tracking is turned on

130 B

Tracks users across multiple sessions.

dtSN_<environmentID>

v4 cookie format

Session

No set limitation, but usually less than 150 B. The size grows with the number of involved frontends.

Tracks a session across multiple requests.

dtCM_<environmentID>

v4 cookie format

Session

38 B

Stores the consent state. This is the only cookie that can be stored when the end user has not consented to data collection; see opt-in mode.

Upgrade RUM cookies

To upgrade RUM cookies for a frontend

  1. Go to Experience Vitals Experience Vitals > Overview.

  2. Select Web to view all web frontends.

  3. Select the frontend you want to configure.

  4. On the Settings tab, select Open in Settings.

  1. Go to Collect and capture > Instrumentation > RUM cookies upgrade.
  2. Turn on Upgrade RUM cookies.

To upgrade RUM cookies for the whole environment

  1. Navigate to Settings Settings > Collect and capture > Real User Monitoring > Instrumentation > Web > RUM cookies upgrade.
  2. Turn on Upgrade RUM cookies.

Web storage

RUM, RUM Classic, and Session Replay use both sessionStorage and localStorage. The following table lists the possible entries. Some of them back up cookies, because browsers may evict cookies when a large number are set.

KeyStoragePurpose

rxVisitor<environmentID>

Stored in localStorage when user tracking is enabled, and in sessionStorage otherwise.

Backs up the rxVisitor<environmentID> cookie.

rxvisitid<environmentID>

sessionStorage

Backs up the session ID from the dtPC<environmentID> cookie.

rxvt<environmentID>

sessionStorage

Backs up the rxvt<environmentID> cookie.

dtCookie<environmentID>

sessionStorage

Backs up the dtCookie<environmentID> cookie.

dtSa<environmentID>

sessionStorage

Backs up the dtSa<environmentID> cookie.

ruxitagentjs_<appID or empty>_Store

localStorage

Stores the last beacon response, which contains the RUM JavaScript configuration.

dt-pVO

localStorage

Indicates that persistent values were removed by using the API method dtrum.disablePersistentValues.

dtsrNOSR

localStorage.

Stores the severity of the latest "reason for no Session Replay" message and the visitId. Exists until RUM JavaScript version 1.333.

dtSR<environmentID>

By default in localStorage, optionally in cookies.

Stores the values required to keep the recording consistent across pages when Session Replay is enabled. Exists from RUM JavaScript version 1.335.

dtsrTID

sessionStorage

Stores the current tab ID for Session Replay.

dtsrTIDrSt

sessionStorage

Boolean flag for Session Replay that indicates whether a window was opened programmatically recently.

Web storage for RUM

When RUM on the latest Dynatrace is enabled, entries are persisted to web storage in addition to the ones described in Web storage. The following table lists the possible entries.

KeyStoragePurpose

dtCFG_<environmentID>_<appID>

localStorage

Stores the current frontend configuration from the beacon response.

dtCM_<environmentID>

localStorage

Stores the consent state. This is the only entry that can be stored when the end user has not consented to data collection; see opt-in mode.

dtOFF_<environmentID>_<appID>

localStorage

Stores the off state, which turns off the RUM JavaScript temporarily, and the reason it was set. Can be triggered by certain responses from the beacon endpoint, by invalid beacon responses, or by automatic cookie domain detection failures.

dtSC_<environmentID>

sessionStorage

Stores the source context and passes it to the next HTML document during a hard navigation. This allows RUM to add user action source fields.

dtTAB_<environmentID>

sessionStorage

Identifies the browser tab.

dtTabUnload

sessionStorage

Stores the tab load state.

IndexedDB

Session Replay uses IndexedDB to persist resource capture state across sessions. The following table lists the possible entries.

Store NamePurpose

dT_store#global

When Session Replay is enabled, dT_store#global stores content hashes of CSS resources already captured by Dynatrace. Used to avoid re-uploading unchanged resources in future sessions.

dT_store#visit

When Session Replay is enabled, dT_store#visit buffers captured resource content and metadata awaiting transmission, and tracks resources that could not be fetched within the current visit.

Suffix for cookie names and web storage keys

In environments created in Dynatrace version 1.294+, a suffix is added to cookie names and to the keys of certain web storage entries. In the tables above, this suffix is shown as <environmentID>. It prevents interference when different Dynatrace environments have overlapping cookie domains.

If you need the full cookie names to configure your firewalls and other infrastructure, you can retrieve them using the API endpoint RUM cookie names API - GET cookie names. To find them in the UI

  1. Go to Experience Vitals Experience Vitals > Overview.

  2. Select Web to view all web frontends.

  3. Select the frontend you want to configure.

  4. On the Settings tab, select Open in Settings.

  1. Go to Collect and capture > Instrumentation > Cookies. If there's no Instrumentation entry, go to Collect and capture > Injection > Cookie instead.

  2. Find the cookie names at the top of the section.

Allow users to opt in to cookies, web storage, and IndexedDB

Dynatrace cookies, web storage, and IndexedDB are required for Real User Monitoring to work. By default, Dynatrace creates them automatically. To protect your end users' privacy, you can give them the option to accept or decline cookies, web storage, and monitoring in general. This is done through opt-in mode.

When opt-in mode is enabled, monitoring is disabled by default. As a result, Dynatrace sets no cookies, does not use web storage, and does not write to IndexedDB. The only exception is the consent state dtCM_<environmentID>. After an end user accepts your data privacy policy, your application must call dtrum.enable() through the JavaScript API to start capturing data. Dynatrace creates cookies and writes to web storage and IndexedDB only after this method is called.

For details on enabling opt-in mode, see Configure data privacy settings for web frontends.

If users do not opt in, monitoring remains disabled.

Configure cookie attributes

Dynatrace RUM does not support the HttpOnly attribute. Since HttpOnly cookies are inaccessible to JavaScript, the RUM JavaScript cannot read or modify them. Ensure that your infrastructure doesn't add the HttpOnly attribute, because this will break monitoring.

If your company's security policy requires the Secure and SameSite cookie attributes, you need to configure RUM to set them, since they aren't set by default; see Configure RUM cookie attributes.