# Count online users by geolocation - how to?

**URL:** <https://community.dynatrace.com/t/count-online-users-by-geolocation-how-to/38160>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, dynatrace-managed, user-sessions\
**Created:** [January 26, 2023, 1:49pm UTC](https://community.dynatrace.com/t/count-online-users-by-geolocation-how-to/38160 "2023-01-26T13:49:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian\_Kefirov](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@Adrian\_Kefirov](https://community.dynatrace.com/u/Adrian_Kefirov)\
**Post date:** [January 26, 2023, 1:49pm UTC](https://community.dynatrace.com/t/count-online-users-by-geolocation-how-to/38160/1 "2023-01-26T13:49:27Z")

</div>

Hello, ladies and gents,

I need to make a dashboard for a client to show him how many real users are online sorted by geolocation.&nbsp;  
I didn’t see a stock chart for this. Can you help me? How to build a code to do that?

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [January 26, 2023, 4:28pm UTC](https://community.dynatrace.com/t/count-online-users-by-geolocation-how-to/38160/2 "2023-01-26T16:28:23Z")

</div>

You can achieve this using USQL: [Custom queries, segmentation, and aggregation of session data in RUM Classic — Dynatrace Docs](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/how-to-use-real-user-monitoring/cross-application-user-session-analytics/custom-queries-segmentation-and-aggregation-of-session-data)

 ![Screenshot 2023-01-26 at 13.26.46.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/2/f215b6873a9dad5b83054cda0f27e5dfe82ec5df.png)

The only consideration is, you will not get the real online users, since the USQL will query the completed sessions only, as per doc:

- Only closed user sessions can be queried. Live user sessions aren’t taken into account.

---

<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:** [January 26, 2023, 4:47pm UTC](https://community.dynatrace.com/t/count-online-users-by-geolocation-how-to/38160/3 "2023-01-26T16:47:47Z")

</div>

[@dannemca](https://community.dynatrace.com/user/18264)&nbsp;is correct, you can grab the live users via the Session Segmentation but your not able to tile it on a dashboard:

 ![ChadTurner_0-1674751614395.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/5cb74eccbf0f58e950fb6a6ee0c5a27e001d8cb4.png)

You could however formulate a markdown tile that contains a link to the page as shown above for single click access.

---

<div class="post-metadata">

**Author:** ![fstekelenburg](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fstekelenburg/32/22029_2.png) [@fstekelenburg](https://community.dynatrace.com/u/fstekelenburg)\
**Post date:** [January 27, 2023, 1:50pm UTC](https://community.dynatrace.com/t/count-online-users-by-geolocation-how-to/38160/4 "2023-01-27T13:50:08Z")

</div>

Can you work with the built-in version? (Which already does what you need?)  
Go to _User behavior_ infograph section of the application, click View geolocation breakdown, and in the Geo locations details that appear under the infograph you already see some of the information.  
If you click Expand to large view, you get a total overview.  
Fun part there is that you can use the **Pin to dashboard option**.  
Make sure to filter first, e.g. on user type Real Users.

 ![fstekelenburg_0-1674827397031.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/5/950b0c332ac450ef079a6f520aa5d7e35c345c01.png)

See in the Demo environment:  
World map of “www.easytravel.com” - Dynatrace Demo Live: Demo Live - Dynatrace
