feat(gelderlander): stop the analytics dispatcher and Firebase Analytics #28

Closed
opened 2026-10-10 12:22:41 +02:00 by midas · 1 comment
Owner

Part of #16. Implement according to the decision in #20.

Feature description

De Gelderlander sends every analytics event through one dispatcher with two strategies: Firebase Analytics and Usabilla. It also re-enables Firebase Analytics collection at runtime, although the manifest default is off. Stop both.

Findings (9.21.1, obfuscated: use the anchors)

  • Dispatcher ch (AnalyticsService), anchor "com.kubusapp.analytics.AnalyticsService$trackQualitativeReach$1$1".
    • It holds a static HashSet<hh> of strategies.
    • ch.h(String key, HashMap, Context, String pageViewId) fans out every event. String anchors: "screen_info", "page_type", "page_navpath", "page_world_identifier", "pageViewId", "qualitative_reach_achieved".
    • ch.c(hh) registers a strategy.
    • ch.r(boolean) toggles collection.
  • Strategy interface hh: a(String, HashMap), b(String, String), c(boolean). Implementations:
    • n24: Firebase logEvent / setUserProperty / setAnalyticsCollectionEnabled;
    • omd: forwards to Usabilla events (see #36).
  • g9d (TrackingStarter, anchor "com.kubusapp.tracking.TrackingStarter"):
    • g() registers the Firebase strategy and calls ch.r(true), which overrides the manifest's firebase_analytics_collection_enabled=false.
    • f(cont) (initializeTracking) is run from TrackingStarterWorker, which PrivacyConsentTCF2Activity enqueues. It:
      • enables Crashlytics (#31);
      • starts comScore (#30);
      • sets Firebase In-App Messaging suppression (#34);
      • sets up Facebook (#32);
      • logs user properties (fontScale, USER_PUSH_OPTIN_OS_LEVEL, widget_active).

Approach

  • Return early from ch.h (all events), or skip registering n24 in g9d.g().
  • Force collection off: skip ch.r(true), or make it pass false.
  • Keep g9d.f running for the parts other issues may still want, or split it per SDK as #20 decides.

Done when

  • Build passes; patch applied on 9.21.1.
  • Device check (after asking): no app-measurement.com traffic; consent dialog unaffected.
  • Documented in docs/apps/gelderlander.md.
Part of #16. Implement according to the decision in #20. ## Feature description De Gelderlander sends every analytics event through one dispatcher with two strategies: Firebase Analytics and Usabilla. It also re-enables Firebase Analytics collection at runtime, although the manifest default is off. Stop both. ## Findings (9.21.1, obfuscated: use the anchors) - Dispatcher `ch` (AnalyticsService), anchor `"com.kubusapp.analytics.AnalyticsService$trackQualitativeReach$1$1"`. - It holds a `static HashSet<hh>` of strategies. - `ch.h(String key, HashMap, Context, String pageViewId)` fans out every event. String anchors: "screen_info", "page_type", "page_navpath", "page_world_identifier", "pageViewId", "qualitative_reach_achieved". - `ch.c(hh)` registers a strategy. - `ch.r(boolean)` toggles collection. - Strategy interface `hh`: `a(String, HashMap)`, `b(String, String)`, `c(boolean)`. Implementations: - `n24`: Firebase `logEvent` / `setUserProperty` / `setAnalyticsCollectionEnabled`; - `omd`: forwards to Usabilla events (see #36). - `g9d` (TrackingStarter, anchor `"com.kubusapp.tracking.TrackingStarter"`): - `g()` registers the Firebase strategy and calls `ch.r(true)`, which overrides the manifest's `firebase_analytics_collection_enabled=false`. - `f(cont)` (initializeTracking) is run from `TrackingStarterWorker`, which `PrivacyConsentTCF2Activity` enqueues. It: - enables Crashlytics (#31); - starts comScore (#30); - sets Firebase In-App Messaging suppression (#34); - sets up Facebook (#32); - logs user properties (fontScale, USER_PUSH_OPTIN_OS_LEVEL, widget_active). ## Approach - Return early from `ch.h` (all events), or skip registering `n24` in `g9d.g()`. - Force collection off: skip `ch.r(true)`, or make it pass `false`. - Keep `g9d.f` running for the parts other issues may still want, or split it per SDK as #20 decides. ## Done when - [ ] Build passes; patch applied on 9.21.1. - [ ] Device check (after asking): no `app-measurement.com` traffic; consent dialog unaffected. - [ ] Documented in `docs/apps/gelderlander.md`.
Author
Owner

Implemented and verified on device in ab05dc1 as part of the Disable tracking patch.

Implemented and verified on device in ab05dc1 as part of the Disable tracking patch.
midas closed this issue 2026-10-10 15:24:35 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
midas/midas-patches#28
No description provided.