Respectlytics Respect lytics
Menu
React Native Trial start Privacy-first

How to track trial-start events in React Native without personal data

Trial start is the activation moment for SaaS subscription apps — and the moment most analytics SDKs start tagging the new user with payment-method metadata, plan ID, and trial duration. Respectlytics helps developers avoid collecting personal data in the first place: in React Native, trial start is one named event, fired right after the StoreKit / Billing trial purchase succeeds. Below: where to wire the call, how to compute trial-to-paid rate without per-user joins, and the metadata you should leave in your billing system.

Fire the call right after the platform billing API confirms the trial transaction. Avoid passing the trial duration, the plan ID, or the payment-method type — your billing vendor (App Store Connect, Google Play, Stripe, RevenueCat) already has all of those with authoritative timestamps.

Install the React Native SDK

bash Respectlytics
npm install @respectlytics/react-native
# or
yarn add @respectlytics/react-native

JavaScript-only — no native modules, no auto-linking, no New Architecture migration concerns. Bundle size: ~14KB minified+gzipped. Works in any Expo project (managed or bare) without expo prebuild.

Initialize Respectlytics in React Native

js Respectlytics
// App.tsx (or App.js)
import { useEffect } from 'react';
import Respectlytics from '@respectlytics/react-native';

export default function App() {
  useEffect(() => {
    Respectlytics.configure({ appKey: '<YOUR_APP_KEY>' });
  }, []);
  return <YourApp />;
}

Initialize once in your top-level component. No native config; no Info.plist or AndroidManifest changes. The SDK is Hermes- and JSC-compatible.

Track the event in React Native

js Respectlytics
import Respectlytics from '@respectlytics/react-native';
import { useIAP } from 'react-native-iap';
import { useEffect } from 'react';

export function useTrialStart() {
  const { currentPurchase, finishTransaction } = useIAP();
  useEffect(() => {
    if (currentPurchase?.transactionReceipt && currentPurchase?.isTrial) {
      Respectlytics.track('trial_start');
      finishTransaction({ purchase: currentPurchase, isConsumable: false });
    }
  }, [currentPurchase, finishTransaction]);
}

isTrial on the purchase is set by react-native-iap when the purchase used a free-trial offer. For RevenueCat, check transaction.isTrialPeriod.

Privacy & implementation notes

Your billing system (App Store Connect, Google Play Billing, RevenueCat, Stripe) is the system of record for plan IDs, durations, payment methods, and renewal states. Duplicating that data into your analytics pipeline produces two truths that drift over time. The Respectlytics 5-field schema simply refuses the duplication — by design.

Cohort retention curves ("of the trials started in March, what % were paying in May?") are most accurately computed against your billing data, not your product analytics. Respectlytics tells you product engagement; your billing system tells you revenue truth. Keep them separate.

The React Native SDK is JavaScript-only — no Objective-C/Swift bridging on iOS, no Java/Kotlin bridging on Android. Side effects: no react-native link, no auto-linking, no New Architecture migration concerns, no platform-channel exception surfaces. Trade-off: no access to platform-only metadata (which we don't want to collect anyway).

Works in Expo managed workflow without expo prebuild. No config plugin is required. EAS Build users: nothing to configure. This is the smoothest integration path on RN — most analytics SDKs require ejecting from managed.

How this compares to other analytics SDKs

Trial start eventFirebase AnalyticsMixpanelRespectlytics
Per-user identityapp_instance_id + user_iddistinct_idNever
Plan ID / trial durationRecommendedRecommendedRejected by API
Payment method typeRecommendedRecommendedRejected by API
Trial-to-paid attributionPer-userPer-user (Identity Merging)Session-scoped or via billing system
Cohort retention curvePer-userPer-userOut of scope (use billing data)

Frequently asked questions

How do we compute trial-to-paid conversion rate?

Either by session (a session that emits trial_start and later trial_conversion is converting), or — for the authoritative number — by querying your billing system. Most boards want the billing-system number for revenue, and the session-rate number for product diagnosis.

What about distinguishing 7-day vs 14-day trial cohorts?

If you offer multiple trial lengths, emit distinct event names: trial_start_7d, trial_start_14d. The aggregation gives you per-cohort conversion rate. Don't pass the duration as a parameter — the API rejects it.

Should we tag the source (organic / paid / referral)?

Distinct event names per source — trial_start_organic, trial_start_paid. Keep to your top 3–5 sources; bucket the rest as trial_start_other.

When do we fire — at button tap, or at billing confirmation?

At billing confirmation. Tap-fire produces inflated numbers when users abandon the platform billing prompt; confirmation-fire produces the truthful trial-start rate. The few extra seconds of wait are worth a non-noisy metric.

Related guides

Track what matters. Collect nothing you don't.

Five-field event schema, RAM-only event queue, no IDFA, no AAID, no persistent user IDs. Helps developers avoid collecting personal data in the first place.