# How to Determine DTRUM Session IDs via JS API

**URL:** <https://community.dynatrace.com/t/how-to-determine-dtrum-session-ids-via-js-api/51869>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, user-sessions, javascript\
**Created:** [May 29, 2025, 12:09am UTC](https://community.dynatrace.com/t/how-to-determine-dtrum-session-ids-via-js-api/51869 "2025-05-29T00:09:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RR123](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@RR123](https://community.dynatrace.com/u/RR123)\
**Post date:** [May 29, 2025, 12:09am UTC](https://community.dynatrace.com/t/how-to-determine-dtrum-session-ids-via-js-api/51869/1 "2025-05-29T00:09:00Z")

</div>

Suppose I retrieve the Dynatrace RUM JS tag based on what I see from here [GET OneAgent JavaScript tag — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/env-v2-api-get-oneagent-javascript-tag).

I would like to receive details regarding the dtrum session in the browser. As soon as dtrum is loaded in the browser, I would like to capture the dtrum session Id and any other ID-related data associated with it.

I looked through&nbsp;[Types | RUM JavaScript API - 1.351.2](https://docs.dynatrace.com/javascriptapi/doc-latest/modules/Types.html). However, I couldn’t find any method that returns this piece of data.

Could someone please provide any suggestions as to how to capture the session id from the DTRUM object?

Thanks, and please let me know if you would like further details.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [May 29, 2025, 8:05pm UTC](https://community.dynatrace.com/t/how-to-determine-dtrum-session-ids-via-js-api/51869/2 "2025-05-29T20:05:24Z")

</div>

Hi&nbsp;[@RR123](https://community.dynatrace.com/user/86897)&nbsp;,  
You are correct, there are no such methods in the dtrum object, but you can use [Dynatrace cookies](https://docs.dynatrace.com/docs/shortlink/cookies#dynatrace-rum-cookies) to get the values you are interested in.

---

<div class="post-metadata">

**Author:** ![RR123](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@RR123](https://community.dynatrace.com/u/RR123)\
**Post date:** [June 16, 2025, 3:48pm UTC](https://community.dynatrace.com/t/how-to-determine-dtrum-session-ids-via-js-api/51869/3 "2025-06-16T15:48:14Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;- Thank you. I will be sure to check this out.
