Expo Analytics Setup: Track User Onboarding Without a Data Team
Expo makes it fast to ship. Most analytics solutions make it slow to understand what users actually do after they install. This guide covers a setup that takes under 10 minutes and requires no data infrastructure.
Why Expo apps need onboarding analytics
Expo's fast development cycle means teams ship features quickly. The problem: you can't tell whether a new onboarding screen helped or hurt without step-level funnel data.
Most analytics tools require you to:
- Instrument every event across every screen
- Build funnels manually in a dashboard
- Wire up a data pipeline for reliable delivery
OnRamp's Expo SDK is designed to avoid all three. You call OnRamp.step() at each milestone, and funnels, retention, and session timelines populate automatically.
Compatibility
- Expo SDK 49+ (managed and bare workflow)
- React Native 0.72+
- Works with Expo Go for development
AsyncStorageis the only native dependency (included in Expo)
Install
npx expo install @onramp-sdk/react-native
Using npx expo install instead of npm install ensures the package version is compatible with your current Expo SDK version.
Initialise in your root component
// App.tsx or _layout.tsx
import { useEffect } from 'react'
import { OnRamp } from '@onramp-sdk/react-native'
export default function RootLayout() {
useEffect(() => {
OnRamp.init({
apiKey: process.env.EXPO_PUBLIC_ONRAMP_API_KEY ?? '',
})
}, [])
return <Slot />
}
✓ Tip
Store your API key in .env as EXPO_PUBLIC_ONRAMP_API_KEY. Expo automatically exposes EXPO_PUBLIC_* variables to the client bundle. Never commit your API key directly in code.
Track onboarding steps
import { OnRamp } from '@onramp-sdk/react-native'
export function WelcomeScreen() {
async function handleGetStarted() {
// 1. Do the thing
await markOnboardingStarted()
// 2. Track it
OnRamp.step('onboarding_started')
// 3. Navigate
router.push('/signup')
}
return <Button title="Get started" onPress={handleGetStarted} />
}
Suggested step sequence
onboarding_started
account_created
email_verified
profile_completed
first_action_taken
onboarding_completed
Keep step names lowercase with underscores. The funnel uses exact string matching.
Expo Router specific: tracking navigation events
If you're using Expo Router (file-based routing), you can track page transitions automatically by adding a listener in your root layout:
// app/_layout.tsx
import { usePathname } from 'expo-router'
import { useEffect } from 'react'
import { OnRamp } from '@onramp-sdk/react-native'
const ONBOARDING_PATHS: Record<string, string> = {
'/onboarding/signup': 'signup_screen_viewed',
'/onboarding/profile': 'profile_screen_viewed',
'/onboarding/permissions': 'permissions_screen_viewed',
}
export default function RootLayout() {
const pathname = usePathname()
useEffect(() => {
const stepName = ONBOARDING_PATHS[pathname]
if (stepName) {
OnRamp.step(stepName)
}
}, [pathname])
return <Slot />
}
! Note
Tracking navigation events fires on every visit - including back-navigation. If you want to track task completion (not page views), fire steps inside action handlers instead. Use navigation-based tracking only for measuring where users reach, not what they complete.
Managed workflow considerations
In the managed workflow, you can't add native modules unless they're Expo-compatible. The OnRamp SDK uses only @react-native-async-storage/async-storage, which is bundled with Expo - no config plugin required.
If you later eject to bare workflow, no SDK changes are needed.
Testing your setup in Expo Go
Events appear in the OnRamp dashboard within a few seconds of firing. To verify:
Open your app in Expo Go
Go through the onboarding steps you've instrumented.
Open the OnRamp dashboard → your app → Events
You should see the step events appear within 5–10 seconds.
Check the step names match exactly
The Events view shows raw step names. If you see account_Created instead of account_created, fix the capitalisation before building the funnel.
Build the funnel
Once events are arriving, open Funnel → New funnel in the dashboard. Add your steps in order. The funnel retroactively pulls in any events that already arrived, so you'll immediately see data from your test runs.
What you'll see per step
Entered → Completed → Drop-off rate
account_created: 400 entered, 290 completed = 27.5% drop-off
Expo onboarding analytics
From install to funnel in under 10 minutes
Works with Expo SDK 49+, managed and bare workflows. No data pipeline, no dashboards to configure. Just install, track your milestones, and see your funnel.
Start free trial →
