feat(volkskrant): hide subscription upsell (marketing template) banners #46

Closed
opened 2026-10-10 12:23:24 +02:00 by midas · 0 comments
Owner

Part of #16.

Feature description

de Volkskrant shows subscription upsell through DPG's marketing-template SDK, in several forms:

  • popups;
  • bottom sheets;
  • snackbars ("toasts");
  • full-screen overlays;
  • banners at the top of feeds and overview pages;
  • inline in articles.

These are advertising for DPG's own product. Hide them.

The hard paywall on locked articles goes through the same pipeline (the Fullscreen / isBlocker position) and must keep working as it does now. This issue removes promotional banners only; it does not change what content is accessible.

Findings (7.52.0, unobfuscated)

Resolve

  • nl.persgroep.edition.temptation.data.repository.MarketingTemplatesRouter.resolveTemplate(...) picks MarketingTemplatesAdapter (the new net.persgroep.marketingtemplatessdk) or TemptationAdapter (the old com.persgroep.temptationsdk) per remote config.
  • Configs: Home, Overview, Article, Audio, Game, Edition.
  • Callers: FeedViewModel, OverviewPagerViewModel, ArticleViewModel (via ArticleMarketingTemplateLoader), AudioSdkAuthProvider, GameSdkInterfaceProvider, EditionViewModel.

State: the single choke point

  • nl.persgroep.edition.marketingtemplates.presentation.state.MarketingTemplateStateMapperKt.toMarketingTemplateState(ResultOf) returns either MarketingTemplateState.Available(ImmutableList<MarketingTemplateViewData>, hasReducedContent) or .None.
  • All six callers go through it.

Positions

MarketingTemplatePosition(canBeDismissed, isBlocker), mapped from the SDK in marketingtemplates/data/MarketingTemplatesMapperKt.toDomain(MarketingPosition):

Position Dismissable Blocker Rendered as Meaning
Fullscreen no yes RestrictiveMarketingTemplate The paywall gate (articles, games, podcasts, paper). Keep.
ArticleInline / ArticleInlineNoIntro no no inline in the article Likely the inline paywall when hasReducedContent=true; a promo otherwise
PageTop no no inline at the top of feed/overview Promo
Popup yes no DialogMarketingTemplate Promo
Overlay yes no BottomSheetMarketingTemplate Promo
Toast yes no SnackBarMarketingTemplate Promo
FullscreenOverlay yes no FullScreenOverlayMarketingTemplate Promo
  • ArticleViewModel.checkMarketingTemplateAndRenderArticle blocks the article for any isBlocker template.

Rendering

  • marketingtemplates/presentation/ui/MarketingTemplatePresenterKt.MarketingTemplatePresenter.
  • ui/inline/MarketingTemplateInlinePresenterKt, plus MarketingTemplateInlineViewStateMapper (INLINE_POSITIONS = PageTop, ArticleInline, ArticleInlineNoIntro).
  • GlobalMarketingTemplatePresenterKt / GlobalMarketingTemplateViewModel.

Not a banner

nl.persgroep.edition.externaloffers is Google Play's external-offers billing link-out (ExternalOffersStartupTask, LaunchExternalOfferUseCase). Leave it alone.

Approach

  • In toMarketingTemplateState, filter the template list:
    • always drop Popup, Overlay, Toast, FullscreenOverlay and PageTop;
    • drop ArticleInline* only when hasReducedContent == false;
    • always keep Fullscreen.
  • Return None when nothing is left.
  • Risk: that hasReducedContent identifies the inline paywall is an assumption (it isn't read elsewhere). Verify on the device with a locked article, logged out, before relying on it.
  • Patch name suggestion: Hide subscription banners (same name as #45).

Done when

  • Build passes; patch applied on 7.52.0.
  • Device check (after asking), logged out and logged in:
    • no upsell popups, sheets, snackbars or top banners;
    • a locked article still shows its gate exactly as before;
    • games and podcasts gates unchanged.
  • Documented in docs/apps/volkskrant.md.

Midas Settings

  • Toggle: Verberg abonnementsbanners (hide_subscription_banners), category "Advertenties en promotie", default on. Same key as De Gelderlander.
  • Read in the toMarketingTemplateState filter at runtime. Applies on the next resolve.
  • The Fullscreen gate is never affected, whatever the toggle says.
  • Needs #49 and #50.
Part of #16. ## Feature description de Volkskrant shows subscription upsell through DPG's marketing-template SDK, in several forms: - popups; - bottom sheets; - snackbars ("toasts"); - full-screen overlays; - banners at the top of feeds and overview pages; - inline in articles. These are advertising for DPG's own product. Hide them. The hard paywall on locked articles goes through the same pipeline (the `Fullscreen` / `isBlocker` position) and must keep working as it does now. This issue removes promotional banners only; it does not change what content is accessible. ## Findings (7.52.0, unobfuscated) ### Resolve - `nl.persgroep.edition.temptation.data.repository.MarketingTemplatesRouter.resolveTemplate(...)` picks `MarketingTemplatesAdapter` (the new `net.persgroep.marketingtemplatessdk`) or `TemptationAdapter` (the old `com.persgroep.temptationsdk`) per remote config. - Configs: Home, Overview, Article, Audio, Game, Edition. - Callers: `FeedViewModel`, `OverviewPagerViewModel`, `ArticleViewModel` (via `ArticleMarketingTemplateLoader`), `AudioSdkAuthProvider`, `GameSdkInterfaceProvider`, `EditionViewModel`. ### State: the single choke point - `nl.persgroep.edition.marketingtemplates.presentation.state.MarketingTemplateStateMapperKt.toMarketingTemplateState(ResultOf)` returns either `MarketingTemplateState.Available(ImmutableList<MarketingTemplateViewData>, hasReducedContent)` or `.None`. - All six callers go through it. ### Positions `MarketingTemplatePosition(canBeDismissed, isBlocker)`, mapped from the SDK in `marketingtemplates/data/MarketingTemplatesMapperKt.toDomain(MarketingPosition)`: | Position | Dismissable | Blocker | Rendered as | Meaning | | --- | --- | --- | --- | --- | | `Fullscreen` | no | **yes** | `RestrictiveMarketingTemplate` | **The paywall gate** (articles, games, podcasts, paper). Keep. | | `ArticleInline` / `ArticleInlineNoIntro` | no | no | inline in the article | Likely the inline paywall when `hasReducedContent=true`; a promo otherwise | | `PageTop` | no | no | inline at the top of feed/overview | Promo | | `Popup` | yes | no | `DialogMarketingTemplate` | Promo | | `Overlay` | yes | no | `BottomSheetMarketingTemplate` | Promo | | `Toast` | yes | no | `SnackBarMarketingTemplate` | Promo | | `FullscreenOverlay` | yes | no | `FullScreenOverlayMarketingTemplate` | Promo | - `ArticleViewModel.checkMarketingTemplateAndRenderArticle` blocks the article for any `isBlocker` template. ### Rendering - `marketingtemplates/presentation/ui/MarketingTemplatePresenterKt.MarketingTemplatePresenter`. - `ui/inline/MarketingTemplateInlinePresenterKt`, plus `MarketingTemplateInlineViewStateMapper` (`INLINE_POSITIONS` = PageTop, ArticleInline, ArticleInlineNoIntro). - `GlobalMarketingTemplatePresenterKt` / `GlobalMarketingTemplateViewModel`. ### Not a banner `nl.persgroep.edition.externaloffers` is Google Play's external-offers billing link-out (`ExternalOffersStartupTask`, `LaunchExternalOfferUseCase`). Leave it alone. ## Approach - In `toMarketingTemplateState`, filter the template list: - always drop `Popup`, `Overlay`, `Toast`, `FullscreenOverlay` and `PageTop`; - drop `ArticleInline*` only when `hasReducedContent == false`; - always keep `Fullscreen`. - Return `None` when nothing is left. - Risk: that `hasReducedContent` identifies the inline paywall is an assumption (it isn't read elsewhere). Verify on the device with a locked article, logged out, before relying on it. - Patch name suggestion: **Hide subscription banners** (same name as #45). ## Done when - [ ] Build passes; patch applied on 7.52.0. - [ ] Device check (after asking), logged out **and** logged in: - [ ] no upsell popups, sheets, snackbars or top banners; - [ ] a locked article still shows its gate exactly as before; - [ ] games and podcasts gates unchanged. - [ ] Documented in `docs/apps/volkskrant.md`. ## Midas Settings - Toggle: **Verberg abonnementsbanners** (`hide_subscription_banners`), category "Advertenties en promotie", default **on**. Same key as De Gelderlander. - Read in the `toMarketingTemplateState` filter at runtime. Applies on the next resolve. - The `Fullscreen` gate is never affected, whatever the toggle says. - Needs #49 and #50.
midas closed this issue 2026-10-10 21:05:45 +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#46
No description provided.