# How to capture username from form data

**URL:** <https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, request-attributes, user-sessions\
**Created:** [October 22, 2021, 4:32pm UTC](https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075 "2021-10-22T16:32:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AK](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ak/32/164_2.png) [@AK](https://community.dynatrace.com/u/AK)\
**Post date:** [October 22, 2021, 4:32pm UTC](https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075/1 "2021-10-22T16:32:57Z")

</div>

Hi Folks,

I need to capture the usernames from form data shown below.

 ![AK_0-1634920282737.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/7/e780b3fb7bfa74b3a94b018c3c104ffdf5ced6d8.png)

Is it possible? if yes, how can I do that?

Regards,

AK

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [October 22, 2021, 7:14pm UTC](https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075/2 "2021-10-22T19:14:08Z")

</div>

Hi&nbsp;[@AK](https://community.dynatrace.com/user/2080)

Check&nbsp;gautier\_begin’s step by step answer [here](https://community.dynatrace.com/topic/58372)

HTH

Yos

---

<div class="post-metadata">

**Author:** ![AK](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ak/32/164_2.png) [@AK](https://community.dynatrace.com/u/AK)\
**Post date:** [October 22, 2021, 7:31pm UTC](https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075/3 "2021-10-22T19:31:01Z")

</div>

Hi&nbsp;[@Yosi\_Neuman](https://community.dynatrace.com/user/6931),

Thanks for the inputs.&nbsp;I’m able to capture the username appearing on homepage using css selector however, customer don’t want to tag the username that is showing on homepage (after logging in). They want the username that we are entering during login (in the username field of login page).

Homepage (after logging in) will show first name and last name but username entered during the login has different value and that I want capture and tag.

Regards,

AK

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [October 22, 2021, 10:03pm UTC](https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075/4 "2021-10-22T22:03:42Z")

</div>

Hi&nbsp;[@AK](https://community.dynatrace.com/user/2080)

As far as I know there is no way to capture information from input filed.

The question is if its possible to change the login page and add dtrum.identifyUser after username is entered ?

Yos

---

<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:** [October 23, 2021, 8:01am UTC](https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075/5 "2021-10-23T08:01:56Z")

</div>

Hi&nbsp;[@AK](https://community.dynatrace.com/user/2080)&nbsp;,

based on your screenshot I assume the request is form encoded. I you have your services monitored by OneAgent, then it’s easy to setup a request attribute capturing this value:

 ![Julius_Loman_0-1634975980582.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/6/d60d664722ca19645931ac31f44d90cedc2cb237.png)

Then you just add the Request attribute as source for your user tag in the application definition:

 ![Julius_Loman_1-1634976096770.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/73a9d4125da13e280a4e89eb909b91701e28316a.png)

---

<div class="post-metadata">

**Author:** ![AK](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ak/32/164_2.png) [@AK](https://community.dynatrace.com/u/AK)\
**Post date:** [October 25, 2021, 7:09am UTC](https://community.dynatrace.com/t/how-to-capture-username-from-form-data/33075/6 "2021-10-25T07:09:30Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364), It work like a charm. Thank you for your help.

[@Yosi\_Neuman](https://community.dynatrace.com/user/6931), Thanks for some of your inputs too.
