Skip to content

Commit

Permalink
Track when the Reader announcement card is dismissed
Browse files Browse the repository at this point in the history
  • Loading branch information
wargcm committed May 17, 2024
1 parent 854c0b0 commit 290400c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import Foundation
case readerPostCardTapped
case readerPullToRefresh
case readerDiscoverTopicTapped
case readerAnnouncementDismissed
case postCardMoreTapped
case followedBlogNotificationsReaderMenuOff
case followedBlogNotificationsReaderMenuOn
Expand Down Expand Up @@ -741,6 +742,8 @@ import Foundation
return "reader_pull_to_refresh"
case .readerDiscoverTopicTapped:
return "reader_discover_topic_tapped"
case .readerAnnouncementDismissed:
return "reader_announcement_card_dismissed"
case .postCardMoreTapped:
return "post_card_more_tapped"
case .followedBlogNotificationsReaderMenuOff:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ extension ReaderStreamViewController {
return ReaderAnnouncementHeaderView(doneButtonTapped: { [weak self] in
// Set the card as dismissed.
self?.readerAnnouncementCoordinator.isDismissed = true
WPAnalytics.track(.readerAnnouncementDismissed)

// Animate the header removal so it feels less jarring.
UIView.animate(withDuration: 0.3) {
Expand Down

0 comments on commit 290400c

Please sign in to comment.