---
title: Send Optimizely Data Platform data with Real-Time Audiences for Feature Experimentation for the React Native SDK
slug: feature-experimentation/docs/send-odp-data-with-real-time-audiences-for-feature-experimentation-reactnative-prior-to-v4
docTags: 
createdAt: 2026-08-05T20:39:58.000Z
---

## Prerequisites

You must enable [Real-Time Audiences for Feature Experimentation](docId:6UBBxxRv331nBIVZ2lun8) before sending events to ODP from Feature Experimentation.

## Minimum SDK Version

3.0.0 or higher

## Description

The Optimizely Client extension method `sendOdpEvent` lets you send data to the ODP server. You can then use this data to analyze user behavior and optimize experiences across different channels and touchpoints.

Use the `sendOdpEvent` method to

- [Merge or stitch users together](docId\:zofYSXRfkDa-2L5Umjfmy) and determine which event is associated with which customer.
- Send various types of events and actions, such as pageviews, clicks, form submissions, and others. You can include additional data to provide more context and information about the event being tracked.

For example, by connecting an email address identifier with a `fs_user_id` identifier, you can use the `sendOdpEvent` method to send events that are associated with both identifiers. This enables you to track and analyze the behavior of a specific user across different touchpoints and devices.

You cannot create or update user profile data like name or address with `sendOdpEvent`. Instead, you can use the [ODP Create and update customers API endpoint](docId:8V9hWw_Py3-kwJJ5H7uR0) or [ODP UI](docId:9GxAiVHBPBQndq-66qYBy) to manage customer profiles.

## Send events to Optimizely Data Platform

:::hint{type="info"}
- The React Native SDK discards the event immediately if there are any errors (`sdkNotReady`, `odpNotIntegrated`, or `odpNotEnabled`).
- The React Native SDK discards all events (implicit or explicit) with a warning log if requested before the datafile is ready. The datafile should be fully ready before you accept decision requests.
:::

## Parameters

This table lists the required and optional parameters for the `sendODPEvent` method.

| Parameter               | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \`action\` \_required\_ | string | Specifies the subcategory of the event type, used to track the app and user lifecycle.                                                                                                                                                                                                                                                                                                                                                  |
| \`type\`                | string | The type of event to be sent. Defaults to \`fullstack\` for all SDK-generated events if not specified.                                                                                                                                                                                                                                                                                                                                  |
| \`identifiers\`         | Map\\  | A key-value map of user identifiers. Must have at least one key-value pair.                                                                                                                                                                                                                                                                                                                                                             |
| \`data\`                | Map\\  | The event data in a key-value map. The value can be any type (string, number, or boolean.) Although allowed, null values are empty strings. The SDK adds default event data to the given data dictionary. Sending the same key when creating your Map overwrites the default data values.<br />- "idempotence\\\_id":\\<br />- "data\\\_source\\\_type":"sdk"<br />- "data\\\_source":"react-sdk"<br />- "data\\\_source\\\_version":\\ |

## Returns

This method sends event data to the ODP server. It does not provide return values.

## Example

` sendOdpEvent(action: string, type?: string | undefined, identifiers?: Map<string, string> | undefined, data?: Map<string, unknown> | undefined): void`

```javascript
const identifiers = new Map([["fs_user_id", "user123"], ["email", "user123@optimizely.com"]]);
const data = new Map([["count", 1]]);

try {
  optimizelyInstance.sendOdpEvent("purchased", "fullstack", identifiers, data);
} catch (error) {
  // handle error here
}
```

The following diagram shows the network calls between your application, the React Native SDK, and the ODP server when calling the `sendOdpEvent` method:

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/linrrUcbYu5GFvTHE-WIw_6f3561e-aat-network-diagrams-react-native-sendodpevent.png)

1. Your application calls the `sendOdpEvent` method.
2. The React Native SDK makes a POST request to ODP.
3. ODP responds with acknowledgment or relevant error.

## Source files

The language and platform source files containing the implementation for React Native are available on [Github](https://github.com/optimizely/react-sdk/blob/master/src/client.ts).
