React Native SDK

The Ours Privacy React Native SDK brings privacy-first analytics to your React Native applications. It delivers a comprehensive feature set for event tracking, user profiles, and compliance without compromising performance.

Key features include:

  • Event Tracking (track): Record custom events with optional properties.
  • User Identification (identify): Associate events with a specific user ID.
  • Lifecycle Tracking: Automatically capture app start, background, and resume events.

This integration is coming soon. Read the information below to learn more about how it will work.

Installation

Install via npm:

npm install @ours/privacy-react-native

Or yarn:

yarn add @ours/privacy-react-native

Initialization

import { OurPrivacy } from '@ours/privacy-react-native';

OursPrivacy.initialize('YOUR_PROJECT_API_KEY');

Basic Usage

// Identify a user
OursPrivacy.identify('user_12345');

// Track an event with properties
OursPrivacy.track('Item Purchased', {
  item_id: 'sku-001',
  price: 19.99,
});

// Time an event
OursPrivacy.timeEvent('Image Upload');
// ... later ...
OursPrivacy.track('Image Upload');

Compatibility

  • React Native >= 0.60
  • iOS 10+
  • Android API 21+

Getting Help

For support or questions, visit our documentation site or reach out to your account representative.