# Does DT capture the exact network type (ex:3G/4G/wifi) for \[web application's\] sessions?

**URL:** <https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, network-monitoring, user-sessions\
**Created:** [December 30, 2024, 11:59am UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517 "2024-12-30T11:59:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aboud](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Aboud](https://community.dynatrace.com/u/Aboud)\
**Post date:** [December 30, 2024, 11:59am UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517/1 "2024-12-30T11:59:25Z")

</div>

I tried to retrieve web sessions for my web application to determine the network type (such as 3G or 4G) that users are using, but no sessions are being returned. Could you assist me in resolving this issue?

Here is the query I used:

SELECT \* FROM usersession

WHERE useraction.application = “my\_web\_app” AND usersession.networkTechnology IN (“3G”, “2G”, “4G”, “5G”, “802.11x”, “CTRadioAccessTechnologyHSDPA”, “CTRadioAccessTechnologyLTE”)

This query works for **mobile apps** , and sessions are successfully retrieved. However, when querying for **web app sessions** , no data is returned. Could you please help me understand why the query works for mobile apps but not for web sessions?

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [December 30, 2024, 1:39pm UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517/2 "2024-12-30T13:39:47Z")

</div>

Mobile apps often have more direct access to device and network information, while web applications are more restricted due to browser security measures as web browsers generally do not expose detailed network type information (like 3G, 4G, etc.) to web applications for privacy and security reasons,  
You can add user session properties to you web applications with the dtrum API  
[https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum\_types.DtrumApi.html#sendSessionProperties](https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html#sendSessionProperties)  
and the network information API [Network Information API - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API)

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [December 30, 2024, 2:04pm UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517/3 "2024-12-30T14:04:37Z")

</div>

[@Aboud](https://community.dynatrace.com/user/82768)&nbsp;- you are looking for “Effective connection type” for web apps:

 ![ChadTurner_0-1735565022937.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/9/a90e9375f1036c366f38861a573c8dedcbf89b6a.png)

Mobile sessions list is as Network Technology and Connection Type:

 ![ChadTurner_4-1735567188334.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/1/d1ee42d1462ceeddb64d8a55f87361b58a83addf.png)

I’ll have to check, but I’m thinking there is a split between the two being Web Vs Mobile.

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [December 30, 2024, 9:33pm UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517/4 "2024-12-30T21:33:11Z")

</div>

As per my knowledge it is not captured by web application, if you run below query, the connection type is “UNKNOWN” mostly.  
Probably because of different browsers.  
select connectionType FROM usersession WHERE applicationType=“WEB\_APPLICATION”

There is one way to capture this for one of the browsers:  
[NetworkInformation: effectiveType property - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/effectiveType#browser_compatibility)

---

<div class="post-metadata">

**Author:** ![The\_AM](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@The\_AM](https://community.dynatrace.com/u/The_AM)\
**Post date:** [December 30, 2024, 11:32pm UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517/5 "2024-12-30T23:32:10Z")

</div>

**The mobile app session data attempts to obtain the details from device.** It stores these within the user session table, which is why it can be queried.

Conversely, **web applications has this data collected on a best effort basis from the browser network APIs** (as Rohit pointed out). It means not all modern browsers support this, so it will often be missing. Furthermore, the browsers only support showing 2g, 3g, 4g up to 10Mbit/s from what I’ve seen. It’s not much use at showing ‘modern’ downlink speeds (i.e. 200Mbit/s will still show as 4g, 10Mbit/s)

This is also not stored in the user session / actions table. Rather, it’s stored in the waterfall analysis view of a user action and so it’s only kept in short term retention for up to 10 days. It means it cannot be queried directly with USQL.

You will see this on the UA view:

Effective connection type: 4gNetwork downlink: 10 Mbit/sTo be able to query it from USQL, it needs to be converted to user session / action properties first. This might be possible by referencing a JS variable.  
Note, you can confirm which browsers support this as follows.In DevTools, on the console, this works on Edge:  
 ![The_AM_0-1735601365745.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/7/c7f5157fac72a793df72ef83d7dea0bea65bc527.png)

But not on Mozilla Firefox:

![The_AM_1-1735601400867.png](https://global.discourse-cdn.com/dynatrace/original/1X/fa7c88a653953c759bd826c939d01c84217ca2dd.png)

---

<div class="post-metadata">

**Author:** ![Aboud](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Aboud](https://community.dynatrace.com/u/Aboud)\
**Post date:** [February 24, 2025, 7:38am UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517/6 "2025-02-24T07:38:46Z")

</div>

Hello Andrew,

I followed the steps outlined in the documentation and used the JavaScript variable navigator.connection.connectionType as suggested. However, when I run the query in any web app, I am not getting any values returned.

 ![Aboud_0-1740382261522.png](https://global.discourse-cdn.com/dynatrace/original/2X/1/1767ba3018584c1cb9fd2939a3933fe7ef9d4955.png)

SELECT \*  
FROM usersession  
WHERE useraction.application = “Web\_App”  
AND useraction.stringProperties.webnetworksession = “4g”

---

<div class="post-metadata">

**Author:** ![Aboud](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Aboud](https://community.dynatrace.com/u/Aboud)\
**Post date:** [February 26, 2025, 3:59pm UTC](https://community.dynatrace.com/t/does-dt-capture-the-exact-network-type-ex-3g-4g-wifi-for-web-applications-sessions/49517/7 "2025-02-26T15:59:42Z")

</div>

Thanks a lot, its worked 🙂
