feat(volkskrant): stop Firebase Analytics and the GTM-forwarded trackers (Snowplow, comScore) #27

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

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

Feature description

In de Volkskrant, Firebase Analytics logEvent is the single upstream point for most tracking. A Google Tag Manager container forwards Firebase events to Snowplow (DPG), comScore and CIM. Stopping events at the dispatcher or at Firebase stops all of them at once.

Findings (7.52.0)

  • Dispatcher: nl.persgroep.edition.domain.analytics.events.tracking.AnalyticsDispatcherImpl (interface ...feature.component.tracking.domain.AnalyticsDispatcher).
    • track(TrackingEvent) routes FirebaseTrackingEvent to FirebaseTracker.trackEvent and UsabillaTrackingEvent to UsabillaTracker.
    • Events are queued until updateConsent(boolean marketing, boolean cim) runs. That fans out to CimTracker, FirebaseTracker (allow_personalized_ads, collection on), Contentsquare and userProfileSynchronizer.
    • The main caller is TrackingDelegateImpl.track(TrackingEvent, boolean).
  • FirebaseTracker.trackEvent calls logEvent. Its constructor sets the user property "app_version".
  • GTM container: assets/containers/GTM-KQGZHLB.json. Its custom tags:
    • be.persgroep.tracking.TrackingEventsTransmitter / SerialisedContextEventsTransmitter (Snowplow);
    • nl.persgroep.edition.domain.analytics.comscore.ComscoreEventTransmitter (Analytics.notifyViewEvent);
    • nl.persgroep.edition.domain.analytics.cim.CimTagProvider;
    • consent variables ...analytics.consent.Is*ConsentGiven.
  • FirebaseAnalytics is provided by nl.persgroep.edition.injection.AnalyticsModule$Companion.provideFirebaseAnalytics.

Approach (pick one in #20)

  • Option A: no-op FirebaseTracker.trackEvent. This keeps Usabilla routing intact, which #36 handles separately.
  • Option B: no-op the execute(Map) of each GTM CustomTagProvider, to keep Firebase but drop the forwarded trackers.
  • Also call setAnalyticsCollectionEnabled(false), or skip the consent fan-out to Firebase, so Firebase's own automatic events (screen_view, session_start) stop too.
  • Don't make AnalyticsDispatcherImpl.track a no-op before consent without checking the queue. It must not grow without limit.

Done when

  • Build passes; patch applied on 7.52.0.
  • Device check (after asking): no app-measurement.com traffic and no Snowplow/comScore requests in a proxy or logcat; consent dialog unaffected.
  • Documented in docs/apps/volkskrant.md.
Part of #16. Implement according to the decision in #20. ## Feature description In de Volkskrant, Firebase Analytics `logEvent` is the single upstream point for most tracking. A Google Tag Manager container forwards Firebase events to Snowplow (DPG), comScore and CIM. Stopping events at the dispatcher or at Firebase stops all of them at once. ## Findings (7.52.0) - Dispatcher: `nl.persgroep.edition.domain.analytics.events.tracking.AnalyticsDispatcherImpl` (interface `...feature.component.tracking.domain.AnalyticsDispatcher`). - `track(TrackingEvent)` routes `FirebaseTrackingEvent` to `FirebaseTracker.trackEvent` and `UsabillaTrackingEvent` to `UsabillaTracker`. - Events are queued until `updateConsent(boolean marketing, boolean cim)` runs. That fans out to CimTracker, FirebaseTracker (`allow_personalized_ads`, collection on), Contentsquare and `userProfileSynchronizer`. - The main caller is `TrackingDelegateImpl.track(TrackingEvent, boolean)`. - `FirebaseTracker.trackEvent` calls `logEvent`. Its constructor sets the user property "app_version". - GTM container: `assets/containers/GTM-KQGZHLB.json`. Its custom tags: - `be.persgroep.tracking.TrackingEventsTransmitter` / `SerialisedContextEventsTransmitter` (Snowplow); - `nl.persgroep.edition.domain.analytics.comscore.ComscoreEventTransmitter` (`Analytics.notifyViewEvent`); - `nl.persgroep.edition.domain.analytics.cim.CimTagProvider`; - consent variables `...analytics.consent.Is*ConsentGiven`. - `FirebaseAnalytics` is provided by `nl.persgroep.edition.injection.AnalyticsModule$Companion.provideFirebaseAnalytics`. ## Approach (pick one in #20) - Option A: no-op `FirebaseTracker.trackEvent`. This keeps Usabilla routing intact, which #36 handles separately. - Option B: no-op the `execute(Map)` of each GTM `CustomTagProvider`, to keep Firebase but drop the forwarded trackers. - Also call `setAnalyticsCollectionEnabled(false)`, or skip the consent fan-out to Firebase, so Firebase's own automatic events (`screen_view`, `session_start`) stop too. - Don't make `AnalyticsDispatcherImpl.track` a no-op before consent without checking the queue. It must not grow without limit. ## Done when - [ ] Build passes; patch applied on 7.52.0. - [ ] Device check (after asking): no `app-measurement.com` traffic and no Snowplow/comScore requests in a proxy or logcat; consent dialog unaffected. - [ ] Documented in `docs/apps/volkskrant.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:30 +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#27
No description provided.