Skip to main content
The examples below cover the most common integration patterns you’ll encounter when adding Tappd to a React Native app. Each section is self-contained and copy-pasteable. Expand whichever scenario matches your use case and adapt the code to fit your app structure.
Track the full purchase funnel from product view through to order completion. Use Tappd’s standard e-commerce event names so your data maps cleanly to built-in dashboard reports.
Track every step of the authentication flow and link anonymous pre-signup activity to the newly created account.Sign up flow:
Login flow:
Logout — reset the SDK to start a new anonymous session:
With React Navigation (useFocusEffect):Use useFocusEffect so the screen view fires every time a screen comes into focus, not just on initial mount.
Manual tracking with useEffect:Use this approach for screens outside React Navigation’s stack.
This example covers the full push notification lifecycle: requesting permissions, getting the FCM token, registering it with Tappd, handling token refreshes, and tracking notification opens.
Track plan changes and update the customer profile in one flow.Subscription upgrade:
Subscription cancellation:
Track when the app moves between states and clean up the SDK when it goes to the background.
Wrap a TouchableOpacity in a reusable component that tracks every press automatically.
Track individual field interactions and form submissions to understand where users drop off in your sign-up funnel.
Capture unhandled JavaScript errors and fatal crashes with React Native’s global error handler, then forward them to Tappd for analysis.
Track every deep link open and distinguish between cold starts (app was not running) and warm starts (app was already in memory).