Ometria React Native SDK
Ometria helps your marketing department understand and better engage with your customers by delivering personalised emails and push notifications.
The app has two key objectives:
- Getting information about customers (what do they like?)
- Reaching out to customers (saying the right thing to the right people)
For your mobile app, this means:
- Tracking customer behaviour through events. A subset of events is automatically handled by the Ometria SDK, but you have to customize it to your needs. See the event tracking plan
- Sending and displaying push notifications, which requires app developer integration
You can also look at the sample apps we have included for reference implementations. See example-expo
Before you begin, visit the Ometria help centre and follow the steps there to get an API key. Get an API key
Quick start
The recommended setup for new projects is Expo with the New Architecture.
1. Install the package
pnpm add react-native-ometria
# or
yarn add react-native-ometria
# or
npm install react-native-ometria
2. Add the Ometria and Firebase plugins to your app.json / app.config.ts
{
"expo": {
"plugins": [
["react-native-ometria"],
"@react-native-firebase/app",
"@react-native-firebase/messaging",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static",
"forceStaticLinking": ["RNFBApp", "RNFBMessaging"]
}
}
]
]
}
}
3. Start using the SDK
import Ometria from 'react-native-ometria';
...
Ometria.initializeWithApiToken('YOUR_API_KEY').then(() => {
Ometria.trackProfileIdentifiedByEmailEvent('user@example.com');
});
Documentation
- Installation - Detailed installation guide including bare React Native setup
- Event Tracking - Track customer behaviour
- Push Notifications - Set up Firebase and push notifications
- Deep Linking - Handle app links from emails