react-native-ometria
v2.9.0
Published
We help retailers create marketing experiences their customers will love
Readme
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 ↗
[!IMPORTANT] 2.9.x is the last release that supports React Native's Old Architecture. See compatibility for supported React Native Firebase versions.
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-ometria2. Add the Ometria and Firebase plugins to your app.json / app.config.ts
{
"expo": {
"plugins": [
["react-native-ometria"],
["@react-native-firebase/app", { "ios": { "disableSPM": true } }],
"@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('[email protected]');
});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
