Skip to content

Migrate discover events to Event Horizon#5085

Merged
MiSikora merged 1 commit intomainfrom
mehow/task/event-horizon-discover
Mar 9, 2026
Merged

Migrate discover events to Event Horizon#5085
MiSikora merged 1 commit intomainfrom
mehow/task/event-horizon-discover

Conversation

@MiSikora
Copy link
Contributor

@MiSikora MiSikora commented Mar 5, 2026

Description

This migrates Discover related events to Event Horizon.

Relates to PCDROID-419

Testing Instructions

Warning

Unlike other migrations I recommend spending some time on these events and their properties as Discover impacts our impressions and so on.

  • discover_shown
  • discover_category_shown
  • discover_categories_picker_pick
  • discover_categories_pill_tapped
  • discover_category_close_button_tapped
  • discover_categories_picker_shown
  • discover_categories_picker_closed
  • discover_featured_podcast_tapped
  • discover_ad_category_tapped
  • discover_ad_category_subscribed
  • discover_featured_podcast_subscribed
  • discover_show_all_tapped
  • discover_list_show_all_tapped
  • discover_list_collection_header_tapped
  • discover_list_impression
  • discover_list_episode_tapped
  • discover_list_episode_play
  • discover_list_podcast_tapped
  • discover_list_share_tapped
  • discover_list_podcast_subscribed
  • discover_featured_page_changed
  • discover_collection_list_page_changed
  • discover_region_changed
  • discover_collection_link_tapped

Screenshots or Screencast

N/A

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@MiSikora MiSikora added this to the 8.8 milestone Mar 5, 2026
Copilot AI review requested due to automatic review settings March 5, 2026 12:53
@MiSikora MiSikora added [Area] Analytics Analytics related issues do not merge [Type] Enhancement Improve an existing feature. labels Mar 5, 2026
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 5, 2026

2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates Discover-related analytics from the legacy AnalyticsTracker/property maps to typed Event Horizon events across Discover UI surfaces (and a couple of downstream entry points), and bumps the Event Horizon dependency to a version that includes the required Discover event definitions.

Changes:

  • Replaced analyticsTracker.track(...) calls with eventHorizon.track(...) using typed Discover events throughout Discover, Podcast, and Play entry points.
  • Removed now-unused Discover helper extensions on AnalyticsTracker.
  • Updated eventhorizon dependency version.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
modules/services/views/src/main/java/au/com/shiftyjelly/pocketcasts/views/buttons/PlayButton.kt Migrates discover_list_episode_play tracking to Event Horizon for play actions initiated via the play button.
modules/services/analytics/src/main/java/au/com/shiftyjelly/pocketcasts/analytics/AnalyticsTrackerExtensions.kt Removes legacy Discover-specific AnalyticsTracker extension helpers.
modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastFragment.kt Migrates Discover-originated subscribe/tap events emitted from the podcast screen to Event Horizon.
modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/episode/EpisodeFragmentViewModel.kt Migrates Discover-originated episode play event emitted from the episode screen to Event Horizon.
modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/component/PlaylistEpisodesAdapterFactory.kt Import ordering change.
modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/PlaylistsViewModel.kt Import ordering change.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/viewmodel/DiscoverViewModel.kt Migrates discover_shown to Event Horizon and removes legacy tracker injection.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/RegionSelectFragment.kt Migrates discover_region_changed to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/PodcastListFragment.kt Migrates list impression and promotion tap tracking to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/PodcastGridListFragment.kt Migrates list podcast/episode/share/link interactions to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/MostPopularPodcastsAdapter.kt Migrates “most popular” row interactions to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/LargeListRowAdapter.kt Migrates large list row podcast tap/subscribe tracking to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/DiscoverFragment.kt Migrates category/show-all/header/category impressions and category picker interactions to Event Horizon, and wires adapter with Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/DiscoverAdapter.kt Migrates the bulk of Discover feed row events (impressions, taps, page changes, ad-category events, episode events) to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/CollectionListRowAdapter.kt Migrates collection row podcast tapped tracking to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/CategoriesBottomSheet.kt Migrates category picker shown/pick/closed tracking to Event Horizon.
modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/CarouselListRowAdapter.kt Migrates featured/sponsored carousel tap/subscribe tracking to Event Horizon.
gradle/libs.versions.toml Bumps com.automattic:eventhorizon to a newer Pocket Casts snapshot.
Comments suppressed due to low confidence (1)

modules/features/discover/src/main/java/au/com/shiftyjelly/pocketcasts/discover/view/MostPopularPodcastsAdapter.kt:112

  • trackImpression() is called from the item click handler, but it tracks a DiscoverListPodcastTappedEvent. The method name is misleading; either rename it to reflect the tap behavior (e.g., trackPodcastTapped) or change the tracked event if this was intended to be an impression.
    private fun trackImpression(podcast: DiscoverPodcast) {
        fromListId?.let { listId ->
            eventHorizon.track(
                DiscoverListPodcastTappedEvent(
                    listId = listId,

@MiSikora MiSikora marked this pull request as ready for review March 5, 2026 13:04
@MiSikora MiSikora requested a review from a team as a code owner March 5, 2026 13:04
@MiSikora MiSikora requested review from Copilot and sztomek and removed request for a team March 5, 2026 13:04
@MiSikora MiSikora force-pushed the mehow/task/event-horizon-discover branch from fce75c5 to fd75025 Compare March 5, 2026 13:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastFragment.kt:286

  • In fromListUuid?.let { fromListUuid -> ... } the lambda parameter shadows the outer fromListUuid property, making the code harder to read. Rename the lambda parameter to something like listId to avoid shadowing.
        fromListUuid?.let { fromListUuid ->
            eventHorizon.track(
                DiscoverListPodcastSubscribedEvent(
                    listId = fromListUuid,
                    podcastUuid = podcastUuid,

@MiSikora MiSikora force-pushed the mehow/task/event-horizon-discover branch from fd75025 to 595b477 Compare March 5, 2026 13:12
@wpmobilebot
Copy link
Collaborator

Project dependencies changes

list
! Upgraded Dependencies
com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593, (changed from pocket-casts-f49c55e1ffc250dc0719eecfeb9df09f3cb784aa)
tree
 +--- project :modules:features:account
 |    \--- project :modules:features:search
 |         \--- project :modules:services:analytics
-|              +--- com.automattic:eventhorizon:pocket-casts-f49c55e1ffc250dc0719eecfeb9df09f3cb784aa
+|              +--- com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593
 |              \--- project :modules:services:model
-|                   +--- com.automattic:eventhorizon:pocket-casts-f49c55e1ffc250dc0719eecfeb9df09f3cb784aa (*)
+|                   +--- com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593 (*)
 |                   \--- project :modules:services:utils
 |                        \--- project :modules:services:payment
-|                             \--- com.automattic:eventhorizon:pocket-casts-f49c55e1ffc250dc0719eecfeb9df09f3cb784aa (*)
+|                             \--- com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593 (*)
 \--- project :modules:features:discover
      \--- project :modules:features:podcasts
           \--- project :modules:features:player
                \--- project :modules:features:transcripts
                     \--- project :modules:services:sharing
-                         \--- com.automattic:eventhorizon:pocket-casts-f49c55e1ffc250dc0719eecfeb9df09f3cb784aa (*)
+                         \--- com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593 (*)

Copy link
Contributor

@sztomek sztomek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

events look good

Base automatically changed from mehow/task/event-horizon-filters to main March 9, 2026 09:45
@MiSikora MiSikora force-pushed the mehow/task/event-horizon-discover branch from 595b477 to aec0e7c Compare March 9, 2026 09:45
@MiSikora MiSikora merged commit 2c71f11 into main Mar 9, 2026
19 checks passed
@MiSikora MiSikora deleted the mehow/task/event-horizon-discover branch March 9, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Analytics Analytics related issues [Type] Enhancement Improve an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants