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
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ - (TracksEventPair *)eventPairForStat:(WPAnalyticsStat)stat
eventName = @"site_menu_opened";
eventProperties = @{ TracksEventPropertyMenuItemKey : @"pages" };
break;
case WPAnalyticsStatOpenedPeople:
eventName = @"people_management_list_opened";
break;
case WPAnalyticsStatOpenedPerson:
eventName = @"people_management_details_opened";
break;
case WPAnalyticsStatOpenedPlans:
eventName = @"site_menu_opened";
eventProperties = @{ TracksEventPropertyMenuItemKey : @"plans" };
Expand Down Expand Up @@ -469,6 +475,12 @@ - (TracksEventPair *)eventPairForStat:(WPAnalyticsStat)stat
case WPAnalyticsStatPerformedJetpackSignInFromStatsScreen:
eventName = @"stats_screen_signed_into_jetpack";
break;
case WPAnalyticsStatPersonRemoved:
eventName = @"people_management_person_removed";
break;
case WPAnalyticsStatPersonUpdated:
eventName = @"people_management_person_updated";
break;
case WPAnalyticsStatPostListAuthorFilterChanged:
eventName = @"post_list_author_filter_changed";
break;
Expand Down Expand Up @@ -823,11 +835,6 @@ - (TracksEventPair *)eventPairForStat:(WPAnalyticsStat)stat
case WPAnalyticsStatLoginMagicLinkSucceeded:

// to be implemented
case WPAnalyticsStatOpenedPeople:
case WPAnalyticsStatOpenedPerson:
case WPAnalyticsStatPersonRemoved:
case WPAnalyticsStatPersonUpdated:

case WPAnalyticsStatDefaultAccountChanged:
case WPAnalyticsStatNoStat:
case WPAnalyticsStatPerformedCoreDataMigrationFixFor45:
Expand Down
17 changes: 12 additions & 5 deletions WordPress/Classes/Utility/Analytics/WPAnalyticsTrackerMixpanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,12 @@ - (WPAnalyticsTrackerMixpanelInstructionsForStat *)instructionsForStat:(WPAnalyt
case WPAnalyticsStatOpenedPages:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"Site Menu - Opened Pages"];
break;
case WPAnalyticsStatOpenedPeople:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"People Management - Accessed List"];
break;
case WPAnalyticsStatOpenedPerson:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"People Management - Accessed Details"];
break;
case WPAnalyticsStatOpenedComments:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"Site Menu - Opened Comments"];
break;
Expand Down Expand Up @@ -765,6 +771,12 @@ - (WPAnalyticsTrackerMixpanelInstructionsForStat *)instructionsForStat:(WPAnalyt
case WPAnalyticsStatNotificationsSettingsUpdated:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"Notification Settings - Updated"];
break;
case WPAnalyticsStatPersonRemoved:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"People Management - Removed Person"];
break;
case WPAnalyticsStatPersonUpdated:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"People Management - Updated Person"];
break;
case WPAnalyticsStatPushAuthenticationApproved:
instructions = [WPAnalyticsTrackerMixpanelInstructionsForStat mixpanelInstructionsForEventName:@"Push Authentication - Approved"];
break;
Expand Down Expand Up @@ -1006,11 +1018,6 @@ - (WPAnalyticsTrackerMixpanelInstructionsForStat *)instructionsForStat:(WPAnalyt
case WPAnalyticsStatLoginMagicLinkSucceeded:

// To be implemented
case WPAnalyticsStatOpenedPeople:
case WPAnalyticsStatOpenedPerson:
case WPAnalyticsStatPersonRemoved:
case WPAnalyticsStatPersonUpdated:

case WPAnalyticsStatAppUpgraded:
case WPAnalyticsStatDefaultAccountChanged:
case WPAnalyticsStatLogSpecialCondition:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UIKit
import WordPressShared
import WordPressComAnalytics

public class PeopleViewController: UITableViewController, NSFetchedResultsControllerDelegate, UIViewControllerRestoration {

Expand Down Expand Up @@ -102,6 +103,7 @@ public class PeopleViewController: UITableViewController, NSFetchedResultsContro
public override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
tableView.deselectSelectedRowWithAnimation(true)
WPAnalytics.track(.OpenedPeople)
}

public override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Foundation
import UIKit
import WordPressShared
import WordPressComAnalytics

/// Displays a Blog's User Details
///
Expand Down Expand Up @@ -104,6 +105,10 @@ final class PersonViewController : UITableViewController {
WPStyleGuide.configureColorsForView(view, andTableView: tableView)
}

override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
WPAnalytics.track(.OpenedPerson)
}

// MARK: - UITableView Methods

Expand Down Expand Up @@ -193,6 +198,8 @@ private extension PersonViewController {
let service = PeopleService(blog: blog)
service?.deleteUser(user)
navigationController?.popViewControllerAnimated(true)

WPAnalytics.track(.PersonRemoved)
}

func updateUserRole(newRole: Role) {
Expand All @@ -214,6 +221,8 @@ private extension PersonViewController {

// Optimistically refresh the UI
self.person = updated

WPAnalytics.track(.PersonUpdated)
}

func retryUpdatingRole(newRole: Role) {
Expand Down