Obtain userId

Obtain userId

Hi,

I would like to know if it is possible to obtain the userId of the user who interacted with a widget. For example:

I have a button or toggle widget, and when this button is interacted with, I want to send the userId of the user who interacted with it to an analysis script, is this possible?