feat: disable Usabilla campaign surveys #36

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

Part of #16.

Feature description

Both apps use Usabilla to show survey and feedback campaigns: banners and popup forms, triggered by app events. Stop the automatic campaigns, but keep the feedback form the user opens on purpose from settings.

Findings

de Volkskrant (7.52.0)

  • Init: UsabillaStartupTask calls UsabillaUtils.init (Usabilla.initialize + setCustomVariables). Setup in MainActivity uses UsabillaUtils.setup(AppCompatActivity).
  • Campaign triggers: nl.persgroep.edition.feature.component.tracking.domain.tracker.usabilla.utils.UsabillaUtils.sendEvent(Context, String), reached via UsabillaTracker.trackUsabillaEvent.
    • Events: "article", "live", "homefeed", "section_page", "section_menu", "search", "settings", "right_now", "audio", "classic_paper", "digital_paper".
  • Manual feedback, which must keep working: nl.persgroep.edition.settings.feedback.FeedbackViewModel calls Usabilla.loadFeedbackForm.
    • The review banner's negative path uses form id "635aa38388a3bc49ad59d5c5".

De Gelderlander (9.21.1)

  • gmd = UsabillaFeedbackService (anchor "com.kubusapp.usabilla.UsabillaFeedbackService"):
    • i(cont) calls Usabilla.initialize, then setSubmitTelemetryData(false) and sendEvent(ctx, "app_start").
    • f(String) calls Usabilla.sendEvent. Events come from the analytics strategy omd: "home_destination_open", "video_destination_open", "games_destination_open", "podcast_destination_open", "region_destination_open", tutorial_complete.
  • Manual feedback screens: com.kubusapp.feedback.* (FeedbackFragment, DestinationFeedbackActivity). Keep them working.

Approach

  • Shared hook on the unobfuscated SDK: make com.usabilla.sdk.ubform.Usabilla.sendEvent(Context, String) return-void.
    • Campaigns are only evaluated on sendEvent, so this stops them in both apps while loadFeedbackForm keeps working.
    • It can live under dpg/ (the same SDK version in both apps? verify).
  • Don't skip Usabilla.initialize: the manual feedback form needs it.

Done when

  • Build passes; the patch applies on both apps.
  • Device check (after asking): the feedback form in settings still opens; no campaign requests after sendEvent points.
  • Documented in both docs/apps/*.md.

Midas Settings

  • Toggle: Verberg enquêtes (hide_surveys), category "Pop-ups en meldingen", default on.
  • Read in the Usabilla.sendEvent hook at runtime. No restart needed. The manual feedback form in settings is never affected.
  • Needs #49 and the entry point for each app (#50, #51).
Part of #16. ## Feature description Both apps use Usabilla to show survey and feedback campaigns: banners and popup forms, triggered by app events. Stop the automatic campaigns, but keep the feedback form the user opens on purpose from settings. ## Findings ### de Volkskrant (7.52.0) - Init: `UsabillaStartupTask` calls `UsabillaUtils.init` (`Usabilla.initialize` + `setCustomVariables`). Setup in `MainActivity` uses `UsabillaUtils.setup(AppCompatActivity)`. - Campaign triggers: `nl.persgroep.edition.feature.component.tracking.domain.tracker.usabilla.utils.UsabillaUtils.sendEvent(Context, String)`, reached via `UsabillaTracker.trackUsabillaEvent`. - Events: "article", "live", "homefeed", "section_page", "section_menu", "search", "settings", "right_now", "audio", "classic_paper", "digital_paper". - Manual feedback, which must keep working: `nl.persgroep.edition.settings.feedback.FeedbackViewModel` calls `Usabilla.loadFeedbackForm`. - The review banner's negative path uses form id `"635aa38388a3bc49ad59d5c5"`. ### De Gelderlander (9.21.1) - `gmd` = UsabillaFeedbackService (anchor `"com.kubusapp.usabilla.UsabillaFeedbackService"`): - `i(cont)` calls `Usabilla.initialize`, then `setSubmitTelemetryData(false)` and `sendEvent(ctx, "app_start")`. - `f(String)` calls `Usabilla.sendEvent`. Events come from the analytics strategy `omd`: "home_destination_open", "video_destination_open", "games_destination_open", "podcast_destination_open", "region_destination_open", tutorial_complete. - Manual feedback screens: `com.kubusapp.feedback.*` (FeedbackFragment, DestinationFeedbackActivity). Keep them working. ## Approach - Shared hook on the unobfuscated SDK: make `com.usabilla.sdk.ubform.Usabilla.sendEvent(Context, String)` return-void. - Campaigns are only evaluated on `sendEvent`, so this stops them in both apps while `loadFeedbackForm` keeps working. - It can live under `dpg/` (the same SDK version in both apps? verify). - Don't skip `Usabilla.initialize`: the manual feedback form needs it. ## Done when - [ ] Build passes; the patch applies on both apps. - [ ] Device check (after asking): the feedback form in settings still opens; no campaign requests after `sendEvent` points. - [ ] Documented in both `docs/apps/*.md`. ## Midas Settings - Toggle: **Verberg enquêtes** (`hide_surveys`), category "Pop-ups en meldingen", default **on**. - Read in the `Usabilla.sendEvent` hook at runtime. No restart needed. The manual feedback form in settings is never affected. - Needs #49 and the entry point for each app (#50, #51).
midas closed this issue 2026-10-10 15:58:26 +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#36
No description provided.