From 8ebd0eb4f0bc264557a5482e683f90ff9cea87be Mon Sep 17 00:00:00 2001 From: emilylaguna Date: Fri, 19 Nov 2021 16:15:08 -0500 Subject: [PATCH 1/2] Remove a duplicate People opened event --- .../Blog/Blog Details/BlogDetailsViewController.m | 1 - .../Classes/ViewRelated/People/PeopleViewController.swift | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m b/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m index b308af4a11d5..8bb47f1419a1 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m +++ b/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m @@ -1715,7 +1715,6 @@ - (void)showMediaLibraryFromSource:(BlogDetailsNavigationSource)source - (void)showPeople { - [WPAppAnalytics track:WPAnalyticsStatOpenedPeople withBlog:self.blog]; PeopleViewController *controller = [PeopleViewController controllerWithBlog:self.blog]; controller.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever; [self showDetailViewController:controller sender:self]; diff --git a/WordPress/Classes/ViewRelated/People/PeopleViewController.swift b/WordPress/Classes/ViewRelated/People/PeopleViewController.swift index a23a70665765..e052ef98ea50 100644 --- a/WordPress/Classes/ViewRelated/People/PeopleViewController.swift +++ b/WordPress/Classes/ViewRelated/People/PeopleViewController.swift @@ -169,7 +169,12 @@ class PeopleViewController: UITableViewController, UIViewControllerRestoration { super.viewWillAppear(animated) tableView.deselectSelectedRowWithAnimation(true) refreshNoResultsView() - WPAnalytics.track(.openedPeople) + + guard let blog = blog else { + return + } + + WPAppAnalytics.track(.openedPeople, with: blog) } override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { From 9316132119c12094e3d0c14e21169d9e0a1451c4 Mon Sep 17 00:00:00 2001 From: emilylaguna Date: Fri, 19 Nov 2021 16:38:01 -0500 Subject: [PATCH 2/2] Only track the saved list accessed once --- .../Classes/ViewRelated/Reader/ReaderStreamViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift index 3c7c3aadc75a..ade843f6240a 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift @@ -170,7 +170,7 @@ import WordPressFlux var contentType: ReaderContentType = .topic { didSet { - if contentType == .saved { + if oldValue != .saved, contentType == .saved { updateContent(synchronize: false) trackSavedListAccessed() }