---
title: nrSendCustomEvent
source: https://docs.newrelic.com/docs/streaming-video-&-ads/installation/roku/agent-api/events/nrsendcustomevent
---

## Syntax

```js
  nrSendCustomEvent(nr as Object, eventType as String, actionName as String, attr = invalid as Object) as Void
```

## Description

Send a custom event.

## Arguments

| Arguments    | Description                              |
| ------------ | ---------------------------------------- |
| `nr`         | New Relic Agent object.                  |
| `eventType`  | Event type.                              |
| `actionName` | Action name.                             |
| `attr`       | (optional) Attributes associative array. |

## Return

Nothing.

## Example

```js
  	nrSendCustomEvent(m.nr, "MyEvent", "MY_ACTION")
	  attr = {"key0":"val0", "key1":"val1"}
	  nrSendCustomEvent(m.nr, "MyEvent", "MY_ACTION", attr)
```
