iOS Onboarding Analytics: Track User Onboarding in Swift
Native iOS apps have specific patterns for onboarding - permission prompts, App Tracking Transparency, Sign in with Apple. Here's how to instrument your flow and see where users drop off.
iOS-specific onboarding challenges
Native iOS onboarding has a few patterns that affect analytics:
App Tracking Transparency (ATT) - iOS 14.5+ requires explicit permission for cross-app tracking. If you're using any tracking framework that touches IDFA, ATT prompts add friction. The OnRamp SDK doesn't use IDFA and doesn't trigger ATT prompts.
Permission prompt timing - Push notifications, camera, contacts, and location all require separate system prompts. When and how you ask for these significantly affects both the permission grant rate and onboarding completion.
Sign in with Apple - An alternative signup path for iOS users. Segment your funnel by signup method and compare equivalent cohorts before drawing a conclusion about conversion.
Install via Swift Package Manager
In Xcode, go to File → Add Package Dependencies and enter:
https://github.com/onramp-sdk/ios
Select the OnRamp product and add it to your app target.
Or add to your Package.swift:
dependencies: [
.package(url: "https://github.com/onramp-sdk/ios", from: "1.0.0")
]
Initialise the SDK
Call OnRamp.shared.initialize() as early as possible in your app lifecycle:
// AppDelegate.swift
import OnRamp
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
OnRamp.shared.initialize(apiKey: "onr_your_key_here")
return true
}
}
For SwiftUI apps:
// MyApp.swift
import SwiftUI
import OnRamp
@main
struct MyApp: App {
init() {
OnRamp.shared.initialize(apiKey: "onr_your_key_here")
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
✓ Tip
Store your API key in a .xcconfig file rather than hardcoding it in source. Reference it as $(ONRAMP_API_KEY) in your code to avoid committing credentials.
Track each onboarding step
import OnRamp
class SignupViewController: UIViewController {
@IBAction func didTapCreateAccount(_ sender: UIButton) {
AuthService.createAccount(email: email, password: password) { result in
switch result {
case .success:
// Track after the action succeeds
OnRamp.shared.step("account_created")
self.navigateToNextStep()
case .failure(let error):
// Optionally track failures
OnRamp.shared.step("account_creation_failed", properties: [
"error_code": error.code
])
}
}
}
}
In SwiftUI:
import OnRamp
struct SignupView: View {
@State private var isCreating = false
var body: some View {
Button("Create account") {
Task {
do {
try await AuthService.createAccount(email: email, password: password)
OnRamp.shared.step("account_created")
// navigate
} catch {
OnRamp.shared.step("account_creation_failed")
}
}
}
}
}
Track permission prompts correctly
Permission prompts are major drop-off points in iOS onboarding. Track both outcomes:
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in
DispatchQueue.main.async {
if granted {
OnRamp.shared.step("push_permission_granted")
} else {
OnRamp.shared.step("push_permission_denied")
}
}
}
This lets you see in the funnel how many users deny notifications - and whether that denial correlates with overall drop-off (it usually does if you ask too early).
Recommended step map for iOS onboarding
| Step | Event name | When to fire |
|---|---|---|
| App opened first time | app_first_open | In applicationDidBecomeActive, gated by UserDefaults flag |
| Signup started | signup_started | On first tap of "Get started" or "Sign up" |
| Account created | account_created | After successful account creation |
| Email verified | email_verified | When deep link returns to app |
| Notifications allowed | push_permission_granted | In notification permission callback |
| First meaningful action | first_action | After user completes first core task |
Build the funnel
Open the OnRamp dashboard → Funnel → New funnel
Add your iOS app and name the funnel.
Add each step name in order
Enter step names exactly as you pass them to OnRamp.shared.step(). Add both happy-path and failure steps if you want to see error rates in context.
Filter by OS if needed
If you have a cross-platform product, filter the funnel to iOS-only to see platform-specific numbers without Android averaging them out.
What iOS funnels commonly reveal
The most common iOS-specific findings:
- Large drop-off at
email_verified- users who switch to Mail never return. Consider delayed verification. - High denial rate at
push_permission_granted- asking before first value delivery. Move the prompt later. - Gap between ATT-consenting and ATT-denying users - if applicable, track
att_authorizedandatt_deniedto understand the segment.
iOS permission grant rate formula
Grant rate = granted ÷ (granted + denied) × 100
140 granted ÷ (140 + 60) = 70% push permission grant rate
iOS onboarding analytics
See where your iOS users drop off
The OnRamp Swift SDK is three lines to set up. No ATT prompt, no IDFA, no data pipeline. Per-step drop-off, session timelines, and retention cohorts - live in minutes.
Start free trial →
