Welcome to the third post in our bitdrift hands-on series! In today’s post, we’ll show you how to instrument a bitdrift funnel in the Wikipedia iOS app to analyse user drop-off in the donation funnel.
When we announced the release of funnels last year, we made a bold statement: developers can build a funnel on the fly from any existing log or signal in their application — and deploy it to millions of devices in minutes, not months. In this hands-on post, we'll show you exactly how it's done using the donation flow in the Wikipedia app for iOS as our example.
Overview
For this exercise, we’ll make a minor tweak to Wikipedia’s existing donation flow to capture its built-in analytics events in bitdrift. Then we’ll deploy a Workflow to build our funnel, using a timeout matcher to detect sessions that start a donation but never finish it. Finally, we’ll describe how to measure the time between funnel stages and use histograms to select realistic timeout thresholds for production.If you missed the earlier parts of this series, check out:
Part 1: Instrumenting bitdrift in the Wikipedia app (Android | iOS)
Rather than injecting new instrumentation or intercepting OS-level gestures, we’ll reuse the existing analytics events already emitted by Wikipedia’s DonateFunnel.swift. The modified code produces logs like this:
The fields make it easy to filter events in your Session Timeline and match them inside your Funnel Workflow.You can view the modified DonateFunnel.swift file here.
Example: Apple Pay donation flow
For this example, we’ll use the Apple Pay donation flow shown in the following video.
Donation flow in the Wikipedia app
Each tap in this flow generates a log that we’ll match in our workflow. The fields we add to the logs at each step are shown in the following table.
With events flowing into bitdrift, all we need to do is build a Workflow that matches each step in the donation journey.If you need a refresher, check out the Workflow Tutorial video from our first hands-on post. Otherwise, recreate the flow shown below.See how easy it is! Each step uses a Generic Match configured to match the fields from our logs. And at the end, we just drop a "Create Funnel" action.Notice the Timeout Matcher attached to the second-to-last node. It triggers if the final match (applepay_processed/applepay_ui_confirm) doesn’t occur within 10 seconds. That could indicate a failed API call or the user simply abandoning the donation flow. Capturing the session lets you inspect the Timeline and see precisely what happened. Note that we could capture sessions at any stage in the funnel but have only done it one time here for simplicity.Once you have deployed the workflow, navigate through the donation flow a few times in your Simulator — stopping at different stages. Within a few minutes, you’ll see your funnel chart appear. While you wait, you can edit funnel stage titles in the chart with the pencil icon. Unless you actually complete Apple Pay transactions, you’ll start seeing abandoned sessions appear beneath your chart.
Measuring time
We set our timeout matcher to 10 seconds, but how do you know what’s appropriate for production? Too short, and you’ll capture sessions for donations that would have completed successfully. bitdrift provides a handy Measure Time connector for exactly this purpose. It measures the duration between any two nodes in a workflow and plots the results as a histogram.To add one:
Hover over a node in your workflow until the small ⏱️ icon appears.
Drag from the icon to another node.
Done — bitdrift now collects timing data between those steps.
You’ll see duration histograms right inside your Workflow, and corresponding spans in your Session Timeline visualization. Use the p90 or p99 durations from these metrics to choose realistic timeout thresholds for your production funnels.
Final thoughts
With just a few lines of code, we reused Wikipedia’s existing analytics to build a live, on-device funnel — complete with drop-off detection, timeout handling, and timing histograms.No significant changes to the code; just a slight modification to capture the existing analytics events. Look out for a future hands-on post, where we will use those same events to analyse user journeys using Sankey charts.And remember, if you have questions or encounter issues, we are happy to help. Drop into our public Slack channel or email us at info@bitdrift.io.