Track User Engagement with New Duration Signals
We're excited to announce a powerful new addition to TelemetryDeck's SDKs: Duration Signals. This feature makes it easier than ever to understand how users interact with your app over time, helping you identify engagement patterns, optimize workflows, and improve user experience with precise timing data.

With our latest SDK update, measuring how long users spend on different activities in your app becomes as simple as bracketing the activity with two function calls. Whether you want to track how long users take to complete your onboarding flow, how much time they spend reading articles, or how quickly they navigate through a checkout process, Duration Signals make it easy to collect this valuable data.
How It Works
The new Duration Signals API consists of two main functions:
// Start tracking duration
TelemetryDeck.startDurationSignal("onboarding")
// ... user completes the activity ...
// Stop tracking and send the signal
TelemetryDeck.stopAndSendDurationSignal("onboarding")
The SDK automatically handles all the complexities of time tracking, including:
- Precise measurement down to milliseconds
- Excluding time spent while the app is in the background
- Merging parameters from both start and stop calls
- Handling edge cases like multiple starts or missing stops

Real-World Applications
Duration Signals open up new possibilities for understanding user behavior:
- Onboarding Optimization
Track how long users spend in each step of your onboarding process. Identify where users might be getting stuck or which tutorials they skip entirely. - Content Engagement
Measure reading time for articles or viewing time for videos to understand what content truly resonates with your audience. - Feature Discovery
See how long users spend exploring new features after launch, helping you assess the effectiveness of your feature introduction strategy. - Performance Monitoring
Track duration of key operations to identify potential performance bottlenecks from real-world usage.
Understanding how long users spend on different activities in your app is crucial for optimization. With Duration Signals, you're no longer flying blind – you can make decisions based on real usage patterns.
Implementation Details
Duration Signals are available in both our Swift and Kotlin SDKs. The implementation is thread-safe and handles background time appropriately, so you get accurate measurements of actual user engagement time.
The duration is automatically included in your signal as TelemetryDeck.Signal.durationInSeconds
with millisecond precision. You can add custom parameters both when starting and stopping the duration tracking, and they'll be merged in the final signal.
Getting Started
Here's a simple SwiftUI example that tracks how long a user spends viewing a specific screen:
struct ContentView: View {
var body: some View {
VStack {
Text("Welcome to the Tutorial!")
}
.onAppear {
TelemetryDeck.startDurationSignal("tutorial")
}
.onDisappear {
TelemetryDeck.stopAndSendDurationSignal("tutorial")
}
}
}
You can also use Duration Signals to track network request times:
func fetchUserData() async throws -> User {
await TelemetryDeck.startDurationSignal("api-request", parameters: ["endpoint": "user-data"])
let result = try await apiClient.fetchUser()
await TelemetryDeck.stopAndSendDurationSignal("api-request", parameters: ["status": "success"])
return result
}
What's Next?
This is just the beginning for Duration Signals. We're working on enhanced analytics views to help you make the most of this timing data. Refer to this documentation page to learn how to create insights to analyze them effectively in a bar chart like the one above.
We're excited to see how you'll use Duration Signals to better understand your users and optimize your apps. Share your use cases with us on Bluesky, Twitter or Mastodon, or join the discussion in our Slack community!