# React Native

## Setup

Jitsu supports Segment [Analytics for React Native](https://github.com/segmentio/analytics-react-native) library to receive events from React Native applications.

Please follow the [Installation instruction](https://github.com/segmentio/analytics-react-native) to install the library.


:::tip
In all examples below, replace `your-jitsu-domain.com` with your Jitsu installation domain.

Jitsu Cloud users may find domain in the top-right corner of Site's **Setup Instruction** page or
attach custom domain for a specific Site and use it instead.
::: 

## Setting up the client

Jitsu requires additional settings to direct events to a correct Jitsu instance.

```javascript
import { createClient } from '@segment/analytics-react-native';

const segmentClient = createClient({
  proxy: 'https://your-jitsu-domain.com/v1/batch',
  cdnProxy: 'https://your-jitsu-domain.com/v1/projects',
  writeKey: 'BROWSER_WRITE_KEY'
});
```

where:

|            | Description                                                                                                                                                                                                          |
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `proxy`    | Jitsu server [batch endpoint](/docs/sending-data/http#batch-endpoint). E.g.: `https://your-jitsu-domain.com/v1/batch`                                                                                                                 |
| `cdnProxy` | CDN host for settings retrieval. E.g.: `https://your-jitsu-domain.com/v1/projects`                                                                                                                                   |
| `writeKey` | Browser Write Key configured on Jitsu Site entity. If no Browser Write Key is added for Site entity, Site ID value can be used a Write Key. On Jitsu.Cloud can be omitted if Site has explicitly mapped domain name. |


## Event tracking

Please refer to the [Analytics for React Native](https://github.com/segmentio/analytics-react-native) documentation for more details on how to track events with Jitsu.