Skip to content

Commit

Permalink
Merge pull request #10463 from wordpress-mobile/issues/ppp-analytics
Browse files Browse the repository at this point in the history
PPP: Set parent page analytics
  • Loading branch information
danielebogo authored Nov 16, 2018
2 parents ddfef99 + c61b358 commit 96b8a0d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end
##
def wordpress_shared
## for production:
pod 'WordPressShared', '~> 1.4'
pod 'WordPressShared', '~> 1.5.0-beta.1'

## for development:
## pod 'WordPressShared', :path => '../WordPress-iOS-Shared'
Expand Down
8 changes: 4 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ PODS:
- UIDeviceIdentifier (~> 0.4)
- WordPressShared (~> 1.4)
- wpxmlrpc (= 0.8.3)
- WordPressShared (1.4.0):
- WordPressShared (1.5.0-beta.1):
- CocoaLumberjack (~> 3.4)
- FormatterKit/TimeIntervalFormatter (= 1.8.2)
- WordPressUI (1.1.0)
Expand Down Expand Up @@ -172,7 +172,7 @@ DEPENDENCIES:
- WordPress-Editor-iOS (= 1.2)
- WordPressAuthenticator (~> 1.1)
- WordPressKit (= 1.4.5-beta.2)
- WordPressShared (~> 1.4)
- WordPressShared (~> 1.5.0-beta.1)
- WordPressUI (~> 1.1)
- WPMediaPicker (= 1.3.1)
- wpxmlrpc (= 0.8.3)
Expand Down Expand Up @@ -258,12 +258,12 @@ SPEC CHECKSUMS:
WordPress-Editor-iOS: 28339c1311dcdfdd9e50aba60dcf4c35184d032f
WordPressAuthenticator: 0e60d89e1637212bc841a0cf66fc5ef8cac01e52
WordPressKit: a51579f3be252b0d6211fb079ef6dc1caf8ddf47
WordPressShared: f55be10963c8f6dbbc8e896450805ba1dd5353f7
WordPressShared: f6272345642887904f5aefff9d65d566e6c5d634
WordPressUI: d3dbd0258f12560d6607647d3240c62c83e089fe
WPMediaPicker: ea92f84950843c7baf6a7325caed72ad7852418d
wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4
ZendeskSDK: 44ee00338dd718495f0364369420ae11b389c878

PODFILE CHECKSUM: bd4e20c3642754764e0ffe4c4d9401ed84f5dab8
PODFILE CHECKSUM: ad340421c2d82708cd79c77096e466319d00a235

COCOAPODS: 1.5.3
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,15 @@ + (TracksEventPair *)eventPairForStat:(WPAnalyticsStat)stat
case WPAnalyticsStatPluginSearchPerformed:
eventName = @"plugin_search_performed";
break;
case WPAnalyticsStatPageSetParentViewed:
eventName = @"site_pages_set_parent_viewed";
break;
case WPAnalyticsStatPageSetParentSearchAccessed:
eventName = @"site_pages_set_parent_search_accessed";
break;
case WPAnalyticsStatPageSetParentDonePressed:
eventName = @"site_pages_set_parent_done_pressed";
break;
case WPAnalyticsStatPostEpilogueDisplayed:
eventName = @"post_epilogue_displayed";
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ class ParentPageSettingsViewController: UIViewController {
stopListeningToKeyboardNotifications()
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

WPAnalytics.track(.pageSetParentViewed)
}


func set(pages: [Page], for page: Page) {
selectedPage = page
Expand Down Expand Up @@ -226,6 +232,8 @@ class ParentPageSettingsViewController: UIViewController {
// MARK: IBAction

@IBAction func doneAction(_ sender: UIBarButtonItem) {
WPAnalytics.track(.pageSetParentDonePressed)

SVProgressHUD.setDefaultMaskType(.clear)
SVProgressHUD.show(withStatus: NSLocalizedString("Updating...",
comment: "Text displayed in HUD while a draft or scheduled post is being updated."))
Expand Down Expand Up @@ -323,6 +331,7 @@ extension ParentPageSettingsViewController: UISearchBarDelegate {
func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) {
isSearching = true
searchBar.showsCancelButton = true
WPAnalytics.track(.pageSetParentSearchAccessed)
}

func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
Expand Down

0 comments on commit 96b8a0d

Please sign in to comment.