Capture user information with custom Device List button

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?

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);
}