Framework Initialization

Register Plugin with Segment SDK

After adding all the required dependencies in SDK Installation, you need to add the MoEngage plugin with the Segment Client. 

JavaScript
import { MoEngagePlugin } from "react-native-segment-plugin-moengage";
segmentClient.add({ plugin: new MoEngagePlugin() });

Initialize MoEngage SDK

Initialize the MoEngage Plugin in the App.js of your application by using the below API once the App Component is mounted.

JavaScript
import ReactMoE from 'react-native-moengage';
ReactMoE.initialize("YOUR Workspace ID");

Refer to the following for platform-specific initialization:

Sample Implementation

Refer to this GitHub repository for a sample implementation

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?