Analytics Viewer
AndroidiOSDesktop
The Analytics Viewer streams all analytics events from your app in real time. See exactly what events are fired, with what properties, and when -- without checking your analytics dashboard.
Features
- Real-time event stream
- Event name and properties displayed inline
- Support for Firebase, Segment, and custom analytics providers
- Custom wrapper pattern for forwarding all events
Basic Usage
Log analytics events to Snapbug by specifying a provider name:
snapbugAnalytics("firebase").logEvent(
AnalyticsEvent(
eventName = "add_to_cart",
properties = mapOf(
"item_id" to "SKU_123",
"item_name" to "Premium Plan",
"price" to "9.99"
)
)
)Provider Examples
// Forward Firebase events to Snapbug
snapbugAnalytics("firebase").logEvent(
AnalyticsEvent(
eventName = "purchase",
properties = mapOf(
"currency" to "USD",
"value" to "29.99",
"transaction_id" to "T12345"
)
)
)Custom Analytics Wrapper
To automatically forward all analytics events to Snapbug, create a wrapper around your analytics client:
class AnalyticsTracker(
private val firebaseAnalytics: FirebaseAnalytics
) {
fun logEvent(name: String, params: Map<String, String>) {
// Send to your real analytics provider
firebaseAnalytics.logEvent(name, bundleOf(*params.toList().toTypedArray()))
// Forward to Snapbug for debugging
snapbugAnalytics("firebase").logEvent(
AnalyticsEvent(
eventName = name,
properties = params
)
)
}
}info
The provider name (e.g., "firebase", "segment") is a label displayed in the Desktop app. You can use any string to organize events by source.