# Capture user information with custom Device List button

**URL:** https://community.tago.io/t/capture-user-information-with-custom-device-list-button/1521
**Category:** Dashboards
**Created:** [January 9, 2024, 1:55pm UTC](https://community.tago.io/t/capture-user-information-with-custom-device-list-button/1521 "2024-01-09T13:55:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![geovane.silva](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@geovane.silva](https://community.tago.io/u/geovane.silva)
#### Post date: [January 9, 2024, 1:55pm UTC](https://community.tago.io/t/capture-user-information-with-custom-device-list-button/1521/1 "2024-01-09T13:55:47Z")

</div>

Dear Team,

Is there a way to capture the logged in user information when a custom control button is clicked by user on a device list row?

---

<div class="post-metadata">

### Author: ![mateus.silva](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mateus.silva](https://community.tago.io/u/mateus.silva)
#### Post date: [January 10, 2024, 3:02pm UTC](https://community.tago.io/t/capture-user-information-with-custom-device-list-button/1521/2 "2024-01-10T15:02:25Z")

</div>

Yes, there is a way to capture the logged-in user information when the custom control button is clicked by the user on a device list row. When using the Device List widget within the TagoIO Run platform, you can configure the widget to capture user information upon interaction with the custom control button.

This will append an additional object named **environment**. **\_user\_id** to the data sent by the widget when the control button is clicked. That information that is available within the context of the analysis.

const { Utils } = require(“@tago-io/sdk”);

async function startAnalysis(context, scope) {

context.log(“Running Analysis”);

console.log(“Scope:”, scope);

const environment = Utils.envToJson(context.environment);

console.log(“Environment:”, environment);  
}
