feat: disable DPG's Snowplow tracking SDK in de Volkskrant and De Gelderlander #29

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

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

Feature description

Both apps bundle DPG's own tracking SDK (be.persgroep.tracking, Snowplow-based). It is initialised at app start and receives consent updates. Because it is the same SDK in both apps, this is a candidate for a shared unnamed patch under dpg/tracking/, pulled in by each app's tracking patch.

Findings

de Volkskrant (7.52.0)

  • nl.persgroep.edition.di.TrackingModule$Companion.provideTrackingInitConfigHandler(...) builds be.persgroep.tracking.config.InitConfigHandler.
  • Its constructor fetches config and creates TrackingSDK, then calls SnowplowInitializer.init.
  • It is forced at startup by injection into TrackingStartupTask. The task's onStartup() only logs "StartupTask#onStartup tracking SDK completed & enabled=".
  • Events reach it through GTM's TrackingEventsTransmitter custom tag (see #27).

De Gelderlander (9.21.1)

  • x8d.b() (called from MainApplication.onCreate) runs new be.persgroep.tracking.config.InitConfigHandler(ctx, new Platform("gelderlander"), env, cb, options, ...).
  • Consent is passed in through x8d.c() and InitConfigHandler.setConsent.
  • Check whether be.persgroep.tracking is obfuscated in this app. If it is, the shared patch needs anchors that work in both.

Approach

  • Find the narrowest hook inside the SDK itself (SnowplowInitializer.init, or tracker creation in TrackingSDK) so it works in both apps.
  • Keep InitConfigHandler constructible and setConsent callable; both apps call into it.

Done when

  • Build passes; the patch applies on both 7.52.0 and 9.21.1.
  • Device check (after asking) on both apps: no Snowplow collector requests; the app still starts and consent still works.
  • Documented in both docs/apps/*.md.
Part of #16. Implement according to the decision in #20. ## Feature description Both apps bundle DPG's own tracking SDK (`be.persgroep.tracking`, Snowplow-based). It is initialised at app start and receives consent updates. Because it is the same SDK in both apps, this is a candidate for a shared unnamed patch under `dpg/tracking/`, pulled in by each app's tracking patch. ## Findings ### de Volkskrant (7.52.0) - `nl.persgroep.edition.di.TrackingModule$Companion.provideTrackingInitConfigHandler(...)` builds `be.persgroep.tracking.config.InitConfigHandler`. - Its constructor fetches config and creates `TrackingSDK`, then calls `SnowplowInitializer.init`. - It is forced at startup by injection into `TrackingStartupTask`. The task's `onStartup()` only logs "StartupTask#onStartup tracking SDK completed & enabled=". - Events reach it through GTM's `TrackingEventsTransmitter` custom tag (see #27). ### De Gelderlander (9.21.1) - `x8d.b()` (called from `MainApplication.onCreate`) runs `new be.persgroep.tracking.config.InitConfigHandler(ctx, new Platform("gelderlander"), env, cb, options, ...)`. - Consent is passed in through `x8d.c()` and `InitConfigHandler.setConsent`. - Check whether `be.persgroep.tracking` is obfuscated in this app. If it is, the shared patch needs anchors that work in both. ## Approach - Find the narrowest hook inside the SDK itself (`SnowplowInitializer.init`, or tracker creation in `TrackingSDK`) so it works in both apps. - Keep `InitConfigHandler` constructible and `setConsent` callable; both apps call into it. ## Done when - [ ] Build passes; the patch applies on both 7.52.0 and 9.21.1. - [ ] Device check (after asking) on both apps: no Snowplow collector requests; the app still starts and consent still works. - [ ] Documented in both `docs/apps/*.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:40 +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#29
No description provided.