diff --git a/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift b/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift index f4bfa8da5211..9c90bbd23acb 100644 --- a/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift +++ b/WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift @@ -224,6 +224,9 @@ import Foundation case siteSwitcherSearchPerformed case siteSwitcherToggleBlogVisible + // Post List + case postListShareAction + // Reader: Filter Sheet case readerFilterSheetDisplayed case readerFilterSheetDismissed @@ -622,6 +625,8 @@ import Foundation return "site_switcher_search_performed" case .siteSwitcherToggleBlogVisible: return "site_switcher_toggle_blog_visible" + case .postListShareAction: + return "post_list_button_pressed" case .readerFilterSheetDisplayed: return "reader_filter_sheet_displayed" @@ -653,6 +658,8 @@ import Foundation return ["via": "tenor"] case .editorAddedPhotoViaTenor: return ["via": "tenor"] + case .postListShareAction: + return ["button": "share"] default: return nil } diff --git a/WordPress/Classes/ViewRelated/Post/PostListViewController.swift b/WordPress/Classes/ViewRelated/Post/PostListViewController.swift index 03861628337d..9f2e526bef16 100644 --- a/WordPress/Classes/ViewRelated/Post/PostListViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/PostListViewController.swift @@ -732,6 +732,8 @@ class PostListViewController: AbstractPostListViewController, UIViewControllerRe return } + WPAnalytics.track(.postListShareAction, properties: propertiesForAnalytics()) + let shareController = PostSharingController() shareController.sharePost(post, fromView: view, inViewController: self) }