Respectlytics Respect lytics
Menu
React Native Checkout complete Privacy-first

How to track checkout completion in React Native without personal data

Checkout complete is the bottom-funnel commerce event — the moment a successful order is placed. Most analytics SDKs default to building a full per-user purchase history at this point: order ID, total, line items, shipping, billing. Respectlytics helps developers avoid collecting personal data in the first place: in React Native, checkout complete is one named event, fired after the commerce backend confirms the order. Below: client vs server firing, why revenue lives in commerce, and how to compute conversion-rate without per-user joins.

Fire after the commerce backend confirms order success — typically in the navigation-to-thank-you-screen handler. Don't pass the order ID, total, or line items. If you fire from your backend (more reliable for delayed-confirmation flows), use the same event_name.

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

export async function placeOrder(cartId) {
  const result = await orderApi.placeOrder(cartId);
  if (result.ok) {
    Respectlytics.track('checkout_complete');
    navigateToThankYou();
  } else {
    Respectlytics.track('checkout_failed');
  }
}

If the order is confirmed via webhook (some 3D-Secure flows), fire checkout_complete server-side from the webhook handler instead — the user may have closed the app.

Privacy & implementation notes

If you accept payments via Apple Pay, Google Pay, or 3D-Secure flows, the final order confirmation arrives server-side via webhook — sometimes seconds after the user has closed the app. Client-side checkout_complete will miss those. Server-side firing from your commerce-backend webhook handler produces a clean count.

Resist the urge to put order total into product analytics, even "for cohort analysis." Once revenue is in your analytics pipeline, every analyst will use it for something — and the lack of refund-aware mutation, currency conversion, and tax handling will silently corrupt every report. Keep revenue in commerce.

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

Checkout complete eventFirebase AnalyticsMixpanelRespectlytics
Order ID storedYesYesRejected by API
Order total / line itemsYesYesRejected by API
Per-user revenue attributionYesYesUse commerce backend
Conversion-rate by country / platformPer-userPer-userSession-grouped
Refund / chargeback handlingPer-event mutationPer-event mutationOut of scope (use commerce backend)

Frequently asked questions

How do we measure conversion rate without per-user attribution?

Per-session. The rate of sessions emitting checkout_complete divided by sessions emitting add_to_cart (or checkout_start) is the funnel rate. Country-bucketed and platform-bucketed gives you the segments. Per-user lifetime metrics live in your commerce backend, where they belong.

Where do we fire — client or server?

Server-side from the commerce backend's order-confirmation webhook is the most reliable path — client-side fires miss orders confirmed after the user closed the app. Use the Respectlytics REST API from your backend handler. Pick one; firing from both produces double counts.

Can we still compute average order value?

From your commerce backend, yes — that's where order totals live with authoritative timestamps and refund-aware totals. Respectlytics is the completion-rate signal; AOV is a commerce-backend signal.

What about repeat-buyer rate?

Out of scope for Respectlytics — it's an inherently per-user metric. Your commerce backend or customer-data platform has the customer history. Respectlytics tells you whether checkout is working; your CDP tells you who buys repeatedly.

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.