Getting Started

1. Install WebEngage React Native Library

Use the below command in your project directory to install WebEngage React Native library.

npm install react-native-webengage --save

2. Link Dependency

Use this command to automatically link the WebEngage dependency with your project.

react-native link react-native-webengage

You should see the below message in the console after successful linking.

1572

🚧

If you don't see this message in your console, you can follow steps to manually link the library.

Now that the WebEngage React Native library is linked to your project, you will have to install the SDKs for Android and iOS in the respective native apps of your project.

3. Install Android SDK

If you are building your Android app, follow the Getting started steps to install the Android SDK.

4. Install iOS SDK

If you are building your iOS app, follow the Getting started steps to install the iOS SDK.

5. Initialize the SDK

Grab a reference to the WebEngage React Native library in your JavaScript file.

import WebEngage from 'react-native-webengage';
var webengage = new WebEngage();

Additionally, if you're using TypeScript, you need to add the following include JSON array object in the /tsconfig.json file

{
    ...
    "include": [
        "src/**/*",
        "index.d.ts"
    ]
}

🚧

Congratulations!

You have successfully integrated WebEngage with your React Native apps and are sending user session data to WebEngage. Please note that it may take up to a few minutes for data to reflect in your dashboard.

  1. Track user properties as attributes
  2. Track user actions as events
  3. Integrate push messaging
  4. Integrate in-app messaging