Conversion Funnel Implementation for Mobile Apps
A conversion funnel without proper tracking is a diagram a product manager draws from memory. With tracking—it's numbers showing exactly where and for which user segments money falls through the cracks.
Common mistake: track only start and end of funnel (checkout_started → payment_succeeded) then wonder why 60% drop-off is unexplained. The right approach is tracking each step with enough context to explain why users leave.
Funnel Design
Before implementation, define:
- Funnel steps — atomic events uniquely corresponding to user progress
- Step properties — what to know about the user and context at each step
- Drop-off points — what happens to users not advancing to next step
Example e-commerce funnel:
| Step | Event | Key Properties |
|---|---|---|
| 1 | product_viewed |
product_id, category, source |
| 2 | add_to_cart |
product_id, quantity, cart_size |
| 3 | checkout_started |
cart_total, item_count, has_promo |
| 4 | checkout_address_completed |
address_type (new/saved) |
| 5 | checkout_payment_opened |
payment_methods_available |
| 6 | payment_method_selected |
method (card/paypal/apple_pay) |
| 7 | payment_initiated |
method, 3ds_required |
| 8 | payment_succeeded |
order_id, total, method |
Step 7 → 8 with 3ds_required = true creates a separate funnel branch. Without this property, you won't understand why drop-off is higher at this step.
Tracking Implementation
// Android – type-safe wrapper for funnel
object CheckoutFunnel {
fun trackStepCompleted(step: CheckoutStep, props: Map<String, Any> = emptyMap()) {
val eventName = when (step) {
CheckoutStep.ADDRESS -> "checkout_address_completed"
CheckoutStep.PAYMENT_OPENED -> "checkout_payment_opened"
CheckoutStep.PAYMENT_METHOD_SELECTED -> "checkout_payment_method_selected"
CheckoutStep.PAYMENT_INITIATED -> "payment_initiated"
CheckoutStep.PAYMENT_SUCCEEDED -> "payment_succeeded"
CheckoutStep.PAYMENT_FAILED -> "payment_failed"
}
val baseProps = mapOf(
"session_id" to sessionManager.currentSessionId,
"cart_id" to cartManager.currentCartId,
"user_id" to authManager.currentUserId,
"timestamp" to System.currentTimeMillis()
)
analyticsClient.track(eventName, baseProps + props)
}
}
// Usage in ViewModel
checkoutViewModel.onAddressConfirmed.observe(this) { address ->
CheckoutFunnel.trackStepCompleted(
CheckoutStep.ADDRESS,
mapOf(
"address_type" to if (address.isNew) "new" else "saved",
"country" to address.country
)
)
}
// iOS – similar approach
enum CheckoutStep {
case addressCompleted(isNew: Bool, country: String)
case paymentOpened(availableMethods: [String])
case paymentMethodSelected(method: String, requires3DS: Bool)
case paymentSucceeded(orderId: String, total: Double, method: String)
case paymentFailed(errorCode: String, method: String)
}
extension AnalyticsService {
func track(checkoutStep: CheckoutStep) {
let (eventName, props) = checkoutStep.analyticsPayload
amplitude.track(eventType: eventName, eventProperties: props)
}
}
extension CheckoutStep {
var analyticsPayload: (String, [String: Any]) {
switch self {
case .paymentMethodSelected(let method, let requires3DS):
return ("checkout_payment_method_selected", [
"payment_method": method,
"requires_3ds": requires3DS,
"cart_id": CartManager.shared.currentCartId
])
// ...
}
}
}
Building Funnel in Amplitude
In Amplitude Funnel Analysis:
// Amplitude Chart – setup via UI or API
{
"chart_type": "FUNNEL",
"steps": [
{ "event_type": "product_viewed" },
{ "event_type": "add_to_cart" },
{ "event_type": "checkout_started" },
{ "event_type": "payment_succeeded" }
],
"funnel_type": "ordered", // strict order
"conversion_window": 7, // 7 days to complete funnel
"conversion_window_unit": "days",
"segment_definitions": [
{
"name": "iOS users",
"filters": [{"subprop_key": "platform", "subprop_value": ["iOS"]}]
},
{
"name": "Android users",
"filters": [{"subprop_key": "platform", "subprop_value": ["Android"]}]
}
]
}
conversion_window is critical. For product purchases 7 days is reasonable. For SaaS subscriptions could be 30 days. Too short a window underestimates conversion.
Firebase Analytics Funnels
// Firebase funnel via Google Analytics
// Configured in GA4 → Explore → Funnel Exploration
// Via API:
const { BetaAnalyticsDataClient } = require('@google-analytics/data');
const client = new BetaAnalyticsDataClient();
const [response] = await client.runFunnelReport({
property: 'properties/YOUR_PROPERTY_ID',
funnelSteps: [
{
name: 'Product Viewed',
filterExpression: {
filter: {
fieldName: 'eventName',
stringFilter: { value: 'product_viewed' }
}
}
},
{
name: 'Add to Cart',
filterExpression: {
filter: {
fieldName: 'eventName',
stringFilter: { value: 'add_to_cart' }
}
}
},
{
name: 'Purchase',
filterExpression: {
filter: {
fieldName: 'eventName',
stringFilter: { value: 'purchase' }
}
}
}
],
dateRanges: [{ startDate: '30daysAgo', endDate: 'today' }]
});
Analyzing Drop-off Causes
Clean funnel data says "we lose 40% here." It doesn't say why. For understanding causes:
- Session recordings at drop-off step (UXCam/Smartlook): what users did before leaving
- User properties in analytics: who leaves—new or returning, iOS or Android, which plan
- A/B test on high drop-off step: test improvement hypothesis
// Track abandonment reason
class PaymentViewModel : ViewModel() {
override fun onCleared() {
super.onCleared()
if (!paymentCompleted) {
CheckoutFunnel.trackStepCompleted(
CheckoutStep.ABANDONED,
mapOf(
"last_step" to currentStep.name,
"time_on_step_seconds" to stepTimer.elapsed(),
"error_shown" to lastErrorShown
)
)
}
}
}
What We Do
- Design funnel steps with product team: atomic events with full context
- Implement type-safe wrapper for each funnel step
- Add abandonment tracking with reason for key drop-off points
- Set up Funnel Report in Amplitude/Firebase with platform and cohort segmentation
- Connect Session Replay on steps with highest drop-off for qualitative analysis
Timeline
Taxonomy design and tracking implementation: 2–3 days. Dashboards and initial analysis: another 1–2 days. Cost calculated individually.







