Respectlytics Respect lytics
Menu
React Native Onboarding completion Privacy-first

How to track onboarding completion in React Native without personal data

Onboarding completion is the cheapest activation signal you have, and the most common place teams accidentally start collecting PII ("let's tag the event with the user's email so we can re-engage them"). Respectlytics helps developers avoid collecting personal data in the first place: in React Native, you emit a single `onboarding_complete` event with **no metadata** when the user finishes the last step of your flow. Funnel analysis is computed from the per-event-name session counts you already have. Below: a complete React Native pattern for the step-by-step funnel, what fails fast against the API, and the resulting comparison to Firebase / Mixpanel.

Treat each onboarding step as its own event name (`onboarding_step_1_complete`, `onboarding_step_2_complete`, …, `onboarding_complete`). Funnel rates are then session-grouped event-name counts — no per-user attribution required. The pattern below is what we recommend for most React Native apps.

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';

// Each step:
Respectlytics.track('onboarding_step_1_complete');

// Final step button:
function FinalStep({ onFinish }) {
  return (
    <Button
      title="Get started"
      onPress={() => {
        Respectlytics.track('onboarding_complete');
        onFinish();
      }}
    />
  );
}

If you use `@react-navigation/native`, fire the call in your `onPress` handler before navigating — events are RAM-only and unsent events are lost on force-quit.

Privacy & implementation notes

Common mistake: emitting one `onboarding_step_completed` event with `{step: 1}` as a parameter. Respectlytics's API rejects that with a 400. Instead, emit `onboarding_step_1_complete`, `onboarding_step_2_complete`, etc. as distinct event names — Respectlytics's funnel auto-discovery picks them up without any manual configuration.

The most frequent unintentional PII leak is sending the user's email or phone number as event metadata ("so we can re-engage them later"). The API returns a 400 with the offending field name — so this fails on the first integration test, not after months of unnoticed silent collection.

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

Onboarding completion event Firebase Analytics Mixpanel Respectlytics
Per-user identity app_instance_id distinct_id (if signed in) Never
Step metadata as parameters Up to 25 params per event Up to 250 properties Use distinct event_name per step
Email / signup_method as event property Recommended Recommended Rejected by API
Session-level funnel computation Yes (session-scoped tables) Yes (insights builder) Yes (default)
What you store about who finished a lot a lot event_name + session_id (rotated) + timestamp + platform + country

Frequently asked questions

Why use distinct event_names per step instead of one event with a step parameter?

Two reasons. First, Respectlytics's API rejects custom parameters — you have five fields, period. Second, distinct event names compose better with the automatic funnel-discovery feature: any monotonic sequence of event names in a session is a candidate funnel, no manual configuration required.

How do we segment onboarding completion by acquisition source?

If your acquisition source is one of N values (organic, paid_search, referral, …), emit it as part of the event name: `onboarding_complete_organic`, `onboarding_complete_paid_search`, etc. The aggregation engine groups them. Avoid composing freeform combinations — keep your taxonomy short.

What about completion time / duration?

Two timestamped events in the same session implicitly carry duration — compute it server-side in your dashboard, not as an event property. The raw timestamps stay on Respectlytics; the duration metric is your derivation.

Should we track each step view or just step completions?

Just completions, in nearly every case. "Saw step 3" with no completion is rarely actionable — a session that has `onboarding_step_2_complete` but no `onboarding_step_3_complete` already tells you they got stuck.

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.