Track events and build your first funnel
To build a funnel with BillDog, send your own events with trackEvent (or AnalyticsManager.track in React Native), identify signed-in users, then open Analytics → Product Analytics → Funnels and add 2 to 8 events in order. Paywall SDKs already send paywall_presented and purchase_completed, so a funnel from your onboarding event to a purchase needs only one line of tracking code.
Steps last checked against the SDK source on 15 Nov 2026.
What you'll build
- A custom event with properties sent from your app
- Events from your test build visible in the dashboard
- A three-step funnel from onboarding to purchase, and how to read its conversion numbers
What you'll need
- An app with the BillDog SDK configured. If you haven't done that yet, start with the iOS, Android, React Native or web codelab
- A paywall on a placement, if you want the paywall steps in your funnel
1. Check which SDK sends your events
3 minYou don't need a separate analytics SDK if you already use BillDog for paywalls. What you need to add depends on the platform:
- iOS (`BillDogFull`): analytics is registered for you when you call
configure. Nothing to add. - Android: analytics is a separate module. Add
billdog-analyticsand register it withBillDog.use(BillDogAnalytics()), shown in the next step. Without it,trackEventhas nowhere to send events. - React Native and Expo:
BillDogConfiguration.configureregisters analytics on both platforms. - Web (`@billdog.io/web`):
trackEventsends each event straight to BillDog.
If your app doesn't sell through BillDog, use the lighter Engage SDK instead (BillDogEng on iOS, billdog-eng on Android). It has analytics, surveys, messaging and flags but no billing code. See the Engage SDK guide. On iOS, don't import BillDogFull and BillDogEng in the same target.
2. Track a custom event with properties
6 minPick an event that marks a milestone before the paywall. This codelab uses onboarding_completed with two properties. Use lowercase snake_case names and keep them stable, because the funnel matches events by exact name.
import BillDogFull
BillDog.shared.trackEvent(
"onboarding_completed",
properties: ["steps_seen": 3, "source": "organic"]
)On Android, add the analytics module and register it once in your Application class, after configure:
dependencies {
implementation("io.billdog:billdog-analytics:1.2.0-beta.1")
}import android.app.Application
import io.billdog.analytics.BillDogAnalytics
import io.billdog.core.BillDog
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
BillDog.configure(this, "bd_public_test_YOUR_KEY")
BillDog.use(BillDogAnalytics())
}
}import io.billdog.core.BillDog
// Not a suspend function: call it from anywhere
BillDog.trackEvent(
"onboarding_completed",
mapOf("steps_seen" to 3, "source" to "organic")
)// npm install @billdog.io/web@1.2.0-beta.1
import BillDog from '@billdog.io/web';
await BillDog.trackEvent('onboarding_completed', { steps_seen: 3, source: 'organic' });import { AnalyticsManager } from '@billdog.io/react-native';
// BillDog itself has no track method in React Native
await AnalyticsManager.getInstance().track('onboarding_completed', {
steps_seen: 3,
source: 'organic',
});3. Identify signed-in users
3 minUntil you identify a user, events are recorded against an anonymous ID created on first launch. Call identify when a user signs in so their events, and their purchases, follow them across devices and reinstalls.
Task {
do {
_ = try await BillDog.shared.identify(userId: "user_123")
} catch {
print("Identify failed: \(error)")
}
}import android.util.Log
import androidx.activity.ComponentActivity
import androidx.lifecycle.lifecycleScope
import io.billdog.core.BillDog
import kotlinx.coroutines.launch
class SignInActivity : ComponentActivity() {
private fun onSignedIn(userId: String) {
lifecycleScope.launch {
// identify is a suspend function that returns a Result
BillDog.identify(userId)
.onFailure { Log.w("BillDog", "Identify failed", it) }
}
}
}await BillDog.identify('user_123');On sign-out, call logOut() so the next person on the device gets a fresh anonymous ID.
4. Optional: wait for analytics consent
3 minConsent checks are off by default, so events are sent as soon as you configure. If your app must ask first (for example, under GDPR), require consent at launch and grant it when the user accepts. The SDKs remember the choice across launches.
// At launch, before any tracking
BillDog.shared.setConsentRequired(true)
// When the user taps Accept (or false for Decline)
BillDog.shared.setConsentGiven(true)BillDog.setConsentRequired(true)
BillDog.setConsentGiven(true)While consent is required and not given, trackEvent drops events instead of queuing them. They are not sent later when consent arrives.
5. Check that events arrive
4 minRun your app and trigger the event a few times. Native SDKs batch events, so while testing you can push the queue out straight away with BillDog.shared.flushAnalytics() on iOS, BillDog.flushAnalytics() on Android, or AnalyticsManager.getInstance().flush() in React Native.
- Events sent with a
bd_public_test_key are stored as sandbox data. Flip the Production / Sandbox switch in the dashboard header to Sandbox, or you won't see them. - Open Analytics, choose the Product Analytics tab, then pick Event Tracking from the report menu.
- Open the Event Stream tab.
onboarding_completedshould be listed under Recent Events. Filter by Customer ID to see only your test user.
Production reports never include sandbox events, so test traffic can't inflate your real numbers. Switch back to Production after release to see real users.
6. Build the funnel
5 minPaywall SDKs record these events for you when they show a paywall: paywall_presented, paywall_dismissed and purchase_completed on every platform, plus purchase_started on iOS and Android. You'll combine them with your own event.
- In Analytics → Product Analytics, pick Funnels from the report menu. The page is titled Funnel Analysis.
- Under Define Funnel Steps, use Select event or action... to add
onboarding_completed, thenpaywall_presented, thenpurchase_completed. If the menu is empty, type each name into Enter event name... and click +. - Leave Step ordering on In order — other events may happen in between, and leave Conversion window (days) empty to count the whole date range.
- Click Run Funnel. The button stays disabled until you have at least two steps.
A funnel takes 2 to 8 steps and each event can appear once. A funnel that mixes events from different BillDog modules (for example paywall_ events with survey_ or notification_ events) needs a plan that includes cross-module funnels. Your own custom events don't count as a module, so the funnel above runs on any plan.
7. Read conversion between steps
4 minThe Conversion Funnel card shows one bar per step with the number of users and a percentage. Two numbers matter, and they use different baselines:
- The percentage on each bar is relative to step 1. A funnel reading 100%, 40%, 30% kept 30% of everyone who finished onboarding.
- The drop-off line between two bars (for example
-120 (25.0% drop-off)) is relative to the step just above it. Use it to find the single worst step. - Overall Conversion at the bottom is the last step's percentage. Total Drop-off is everyone lost between the first and last step.
Click a bar to see who reached that step, or a drop-off line to see who left. To compare groups, set Break down by (optional) to a property such as prop:source. Each user is placed by their value at the first step they reached.
Next, try to improve the weakest step: run an A/B test on the paywall, or send an in-app message to users who finished onboarding but didn't buy.