Mobile app attribution SDKMOBILE APP

Install goaffpro in your mobile app

Track which affiliate referred each app install and each conversion. Pick your platform below — all four SDKs speak the same protocol and send the same payloads, so the data looks identical in your dashboard.

Before you start: open your goaffpro dashboard and copy the App ID for your mobile app. Every snippet below uses it as YOUR_APP_ID.

iOS + Android · Expo and bare React Native

@goaffpro/react-native

1. Install the SDK

npm install @goaffpro/react-native

# Required Expo packages (secure state, crypto, device and app metadata)
npx expo install expo-secure-store expo-crypto expo-device expo-localization expo-application expo-linking

2. Configure and report the install

tsx
import { useEffect } from "react";
import { useGoaffpro } from "@goaffpro/react-native";

export function AttributionBootstrap() {
  // Configures the SDK. Foreground/background flushing is automatic in the hook.
  const { installAttribution } = useGoaffpro("YOUR_APP_ID");

  useEffect(() => {
    // Report the install once. A failure is non-fatal — it retries on the next launch.
    void installAttribution();
  }, [installAttribution]);

  return null;
}

3. Log conversions

ts
const { logEvent } = useGoaffpro("YOUR_APP_ID");

await logEvent("purchase", {
  revenue: { amount: 2499, currency: "INR" },
  orderId: "ORD-5512",
});

4. Required app lifecycle wiring

tsx
// Render the bootstrap before your first screen so the install report fires
// as early as possible.
<AttributionBootstrap />
  • The useGoaffpro hook auto-configures the SDK and wires app foreground/background flushing, so no manual lifecycle calls are needed.
  • Expo deep links are captured automatically through expo-linking.
  • Other conversion hooks — onAttribution, identify and handleDeepLink — are exported from the same hook.

Need help installing ? We are here to help. Get in touch — or see the custom integration guide for website-based stores.