Skip to content

Firebase Analytics and Telemetry

neil warner edited this page Oct 12, 2026 · 2 revisions

Firebase Analytics & Cross-Platform Telemetry

Firebase Project: selahwordapp
GA4 Web Measurement ID: G-7LFS54TTFM
Android Package: com.example.selah_prototype_audio_13sep2026
Console Quick Link: Firebase Analytics Realtime | GA4 Dashboard


๐Ÿ“Š Telemetry Architecture: Web & Android Parity

Selah unifies mobile and web analytics into a single data stream under Firebase and Google Analytics 4 (GA4):

graph TD
    subgraph Web App
        WA[Flutter Web App] -->|dart:js_interop| GT[gtag.js / G-7LFS54TTFM]
        GT -->|HTTPS| GA4[Google Analytics 4 & Firebase]
    end

    subgraph Android App
        AA[Flutter Android App] -->|Platform Channel| SDK[Firebase Analytics SDK]
        SDK -->|Google Play Services| GA4
    end

    subgraph Console Dashboards
        GA4 --> RT[Firebase Realtime Dashboard]
        GA4 --> OV[Firebase Analytics Overview]
        GA4 --> DV[DebugView Live Stream]
    end
Loading

๐ŸŒ Will Web Work Tomorrow as Well as Android?

Yes! Both platforms stream into the exact same Firebase Analytics container:

  • Android: Events dispatched via native Google Play Services Firebase Analytics SDK.
  • Web: Events dispatched via gtag.js loaded in web/index.html with measurement ID G-7LFS54TTFM, bridged via Dart interop in lib/src/core/analytics/web_gtag_helper_web.dart.
  • When users visit the Staging Web Preview or install the Android APK, all session, screen, passage, and loop events appear side-by-side in real-time.

๐Ÿ”— Quick Console Links for Reviewers


๐Ÿท๏ธ Standard User Properties

Every event logged includes user properties to separate test traffic from real devotional listeners:

User Property Values Description
k_debug_mode "true", "false" Identifies whether the app is running in debug mode or production.
marionette_driving "true", "false" Identifies whether an automated UI test driver (Marionette, Patrol, or Maestro) is operating the interface.
app_version "0.3.1", "0.4.0" Current client build semver.
platform "web", "android", "ios" Operating system or client environment.

๐Ÿ“‹ Core Event Catalog

Event Name Parameters Purpose
app_open platform, app_version Session start telemetry.
passage_selected reference, translation, is_curated Measures which scripture passage was chosen for meditation.
repetition_knob_changed count (1, 3, 7, -1) Tracks loop preferences (endless vs fixed repetitions).
playback_started reference, duration_seconds Audio playback start and duration metrics.
playback_completed reference, cycles_completed Measures whether the user listened through full meditative cycles.
feedback_submitted sentiment (happy, neutral, sad), rating, has_screenshot Tracks satisfaction and feedback pipeline health.

โฑ๏ธ Real-Time vs DebugView Latency

Environment Inspection Tool Latency Configuration Required
Web Realtime Google Analytics Realtime Dashboard 15โ€“30 seconds None (G-7LFS54TTFM tag in web/index.html)
Web DebugView Firebase Console > Analytics > DebugView 1โ€“3 seconds Auto-injected in debug mode ('debug_mode': true) or Chrome GA Debugger extension
Android ADB adb logcat -s FA FA-SVC Instant (<500ms) adb shell setprop debug.firebase.analytics.app <package_name>

๐Ÿ› ๏ธ Enabling Real-Time Debugging on Android (ADB)

To stream real-time events from an Android test device (e.g., Pixel 9a) directly to Firebase DebugView:

# 1. Enable analytics debug mode on the device
adb shell setprop debug.firebase.analytics.app com.example.selah_prototype_audio_13sep2026

# 2. Monitor real-time event dispatch live in terminal
adb logcat -v time -s FA FA-SVC

To turn off debug mode when finished:

adb shell setprop debug.firebase.analytics.app .none.

๐Ÿ”— Related Pages

Clone this wiki locally