---
title: nrSetUserId
source: https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/user-identification/setuserId
---

## Syntax

```js
  nrSetUserId(userId as String) as Void
```

## Description

Sets userId.

## Arguments

| Arguments | Description             |
| --------- | ----------------------- |
| `nr`      | New Relic Agent object. |
| `userId`  | attribute               |

## Return

Nothing.

## Example

```js
  	nrSetUserId(m.nr, "TEST_USER")
```
