Skip to Content
DocumentationReact Native SDKOverview

React Native SDK

The AttributeHQ React Native SDK (@attributehq/react-native-sdk) provides install attribution and event tracking for cross-platform React Native apps. It wraps the native iOS and Android SDKs via React Native’s native bridge.

Features

  • Native bridge architecture — Same approach as AppsFlyer and Adjust
  • Full native access — IDFA, ATT, GAID, Install Referrer, SKAdNetwork
  • TypeScript API — Thin JS wrapper with full type definitions
  • Expo support — EAS Build with built-in config plugin
  • Navigation tracking — Built-in React Navigation v5+ screen tracking
  • Async initializeawait AttributeHQ.initialize() ensures SDK is ready

This SDK does not support Expo Go. It requires native compilation via react-native run-ios/android or Expo EAS Build. This is the same limitation as AppsFlyer and Adjust React Native SDKs.

Architecture

┌─────────────────────────────────────┐ │ React Native App (JavaScript) │ │ ┌───────────────────────────────┐ │ │ │ AttributeHQ.ts (JS wrapper) │ │ │ │ NativeModules.AttributeHQ │ │ │ └──────────┬────────────────────┘ │ │ │ Native bridge │ ├─────────────┼───────────────────────┤ │ iOS │ Android │ │ Swift SDK │ Kotlin SDK │ │ ATT/IDFA │ Install Referrer │ │ SKAdNetwork│ GAID │ └─────────────┴───────────────────────┘

Quick Example

import { AttributeHQ } from '@attributehq/react-native-sdk' // Initialize (async — must await) await AttributeHQ.initialize({ apiKey: 'ak_your_api_key', appId: 'your-app-uuid', }) // Track events (sync) AttributeHQ.track('purchase', { amount: 1500, currency: 'NGN' }) AttributeHQ.trackRevenue(1500, 'NGN', { product: 'premium' }) // Get attribution (async) const attribution = await AttributeHQ.getAttribution()

Next Steps