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 ↗
- Sending and displaying push notifications - requires app developer integration
You can also look at the sample apps we have included for reference implementations. ↗
Before you begin visit the Ometria help centre and follow the steps there to get an API key. ↗
Quick Start
This is the recommended setup for new projects using Expo with the New Architecture.
1. Install the package
- pnpm
- yarn
- npm
pnpm add react-native-ometria
yarn add react-native-ometria
npm install react-native-ometria
2. Add the Expo and Firebase plugins to your app.json or 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(() => {
// Track user identity
Ometria.trackProfileIdentifiedByEmailEvent('user@example.com');
});
What's Next?
- 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
tip
For a complete working example, see the example-expo directory in the SDK repository.