Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ import Foundation
case sharingButtonsEditMoreButtonToggled
case sharingButtonsLabelChanged

// Comment Sharing
case readerArticleCommentShared
case siteCommentsCommentShared

// People
case peopleFilterChanged
case peopleUserInvited
Expand Down Expand Up @@ -756,6 +760,12 @@ import Foundation
case .sharingButtonsLabelChanged:
return "sharing_buttons_label_changed"

// Comment Sharing
case .readerArticleCommentShared:
return "reader_article_comment_shared"
case .siteCommentsCommentShared:
return "site_comments_comment_shared"

// People
case .peopleFilterChanged:
return "people_management_filter_changed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ private extension CommentDetailViewController {
return
}

// track share intent.
WPAnalytics.track(.siteCommentsCommentShared)

let activityViewController = UIActivityViewController(activityItems: [commentURL as Any], applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = senderView
present(activityViewController, animated: true, completion: nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation
import UIKit
import WordPressShared

@objc public extension ReaderCommentsViewController {
func shouldShowSuggestions(for siteID: NSNumber?) -> Bool {
Expand Down Expand Up @@ -104,6 +105,9 @@ import UIKit
return
}

// track share intent.
WPAnalytics.track(.readerArticleCommentShared)

let activityViewController = UIActivityViewController(activityItems: [commentURL as Any], applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = sourceView
present(activityViewController, animated: true, completion: nil)
Expand Down