---
title: Configure event dispatcher for the JavaScript (Node) SDK prior to v6
slug: feature-experimentation/docs/configure-event-dispatcher-javascript-node-prior-to-v6
docTags: 
createdAt: 2026-08-05T20:39:59.000Z
---

The Optimizely Feature Experimentation SDKs make HTTP requests for [every decision event or conversion event](docId\:SzVcfUMHk3IKycnEjgjbq) that gets triggered. Each SDK has a built-in **event dispatcher** for handling these events, but you should overriding it based on the specifics of your environment.

The Node SDK has an out-of-the-box asynchronous dispatcher. You should customizing the event dispatcher you use in production to ensure that you queue and send events in a manner that scales to the volumes handled by your application. Customizing the event dispatcher lets you handle large event volumes efficiently. or to implement retry logic when a request fails. You can build your dispatcher from scratch or start with the provided dispatcher.

The examples show that to customize the event dispatcher, initialize the Optimizely client (or manager) with an event dispatcher instance. The example is for the 3.0.0 and 3.0.1 SDKs.

```javascript
// 3.0.1 SDK and above
const { createInstance, eventDispatcher } = require('@optimizely/optimizely-sdk');

// Create an Optimizely client with the default event dispatcher
var optimizely = createInstance({
  sdkKey: '<YOUR_SDK_KEY>',
  eventDispatcher
});
```

The event dispatcher should implement a `dispatchEvent` function, which takes in three arguments: `httpVerb`, `url`, and `params`, all of which are created by the internal `EventBuilder` class. In this function, you should send a `POST` request to the given `url` using the `params` as the body of the request (be sure to stringify it to JSON) and `{content-type: 'application/json'}` in the headers.

:::hint{type="warning"}
**Important**
If you are using a custom event dispatcher, do not modify the event payload returned from Optimizely. Modifying this payload will alter your results.
:::
