@ottozrq/app-analyzer
v0.1.0
Published
Privacy-first analytics SDK for Expo React Native and Taro
Readme
@ottozrq/app-analyzer
Private, privacy-first analytics SDK for the self-hosted App Analyzer service.
import { createReactNativeAnalytics } from '@ottozrq/app-analyzer/react-native';
export const analytics = createReactNativeAnalytics({
endpoint: process.env.EXPO_PUBLIC_ANALYZER_URL!,
projectKey: process.env.EXPO_PUBLIC_ANALYZER_KEY!,
appId: 'com.example.app',
appVersion: '1.0.0',
environment: __DEV__ ? 'development' : 'production',
enabled: false,
});
await analytics.setEnabled(true); // only after explicit consent
await analytics.track('purchase_completed', { plan: 'annual' });Router adapters collect sanitized page views. Use AnalyticsPressable, useTrackedPress, createTaroTapHandler, or trackInteraction with stable developer-defined names to populate the management UI's feature-usage ranking.
Never send account identifiers, precise coordinates, search or input text, request bodies, response bodies, tokens, or full URLs with query strings. The SDK and API reject these fields.
