diff options
author | Aleksey Belouosv <aleksey@maps.me> | 2019-04-30 13:25:57 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2019-05-08 16:49:33 +0300 |
commit | f72203f2525d4024a180053846a561f08f6bf284 (patch) | |
tree | d99c9837f89e2f89a38495f58320a76380c41b17 /iphone | |
parent | 2094a4c261166f9482433cdb576960d7f2b86d96 (diff) |
[iOS] add stats for deeplinks
Diffstat (limited to 'iphone')
5 files changed, 12 insertions, 1 deletions
diff --git a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift index 1471e5fc55..ece037a07b 100644 --- a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift +++ b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift @@ -43,6 +43,7 @@ final class CatalogWebViewController: WebViewController { } else { deeplink = deeplinkURL } + Statistics.logEvent(kStatCatalogOpen, withParameters: [kStatFrom : kStatDeeplink]) } super.init(url: catalogUrl, title: L("guides"))! backButton = UIBarButtonItem(image: #imageLiteral(resourceName: "ic_catalog_back"), style: .plain, target: self, action: #selector(onBack)) diff --git a/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift b/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift index 448bcfd7db..e3a60f60e0 100644 --- a/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift +++ b/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift @@ -57,7 +57,7 @@ class DownloadedBookmarksViewController: MWMViewController { withParameters: [kStatError : "no_internet"]) return } - Statistics.logEvent("Bookmarks_Downloaded_Catalogue_open") + Statistics.logEvent(kStatCatalogOpen, withParameters: [kStatFrom: kStatDownloaded]) let webViewController = CatalogWebViewController() MapViewController.topViewController().navigationController?.pushViewController(webViewController, animated: true) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index fd279ded2e..71836dbcda 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -488,6 +488,7 @@ BOOL gIsFirstMyPositionMode = YES; - (void)openCatalogAnimated:(BOOL)animated { + [Statistics logEvent:kStatCatalogOpen withParameters:@{kStatFrom : kStatMenu}]; [self openCatalogDeeplink:nil animated:animated]; } diff --git a/iphone/Maps/Common/Statistics/StatisticsStrings.h b/iphone/Maps/Common/Statistics/StatisticsStrings.h index aa05c42328..04205a1591 100644 --- a/iphone/Maps/Common/Statistics/StatisticsStrings.h +++ b/iphone/Maps/Common/Statistics/StatisticsStrings.h @@ -62,6 +62,7 @@ static NSString * const kStatButton = @"button"; static NSString * const kStatCallPhoneNumber = @"Call phone number"; static NSString * const kStatCampSite = @"campSite"; static NSString * const kStatCancel = @"cancel"; +static NSString * const kStatCatalogOpen = @"Bookmarks_Downloaded_Catalogue_open"; static NSString * const kStatDone = @"done"; static NSString * const kStatCategories = @"Categories"; static NSString * const kStatCategory = @"category"; @@ -90,6 +91,7 @@ static NSString * const kStatCount = @"Count"; static NSString * const kStatCountry = @"Country"; static NSString * const kStatCurrentMap = @"current_map"; static NSString * const kStatDate = @"date"; +static NSString * const kStatDeeplink = @"Deeplink"; static NSString * const kStatDelete = @"delete"; static NSString * const kStatDeleteAll = @"delete all"; static NSString * const kStatDeleteAllWithChanges = @"delete_all_with_changes"; @@ -110,6 +112,7 @@ static NSString * const kStatDownloadMaps = @"download_maps"; static NSString * const kStatDownloadRequest = @"Download request"; static NSString * const kStatDownloadRoute = @"Download route"; static NSString * const kStatDownloader = @"downloader"; +static NSString * const kStatDownloaded = @"Downloaded"; static NSString * const kStatDownloaderDialog = @"Downloader dialog"; static NSString * const kStatDownloaderDownloadCancel = @"Downloader_Download_cancel"; static NSString * const kStatDownloaderMapAction = @"Downloader_Map_action"; @@ -246,6 +249,8 @@ static NSString * const kStatOff = @"Off"; static NSString * const kStatOffline = @"offline"; static NSString * const kStatOffscreen = @"Offscreen"; static NSString * const kStatOn = @"On"; +static NSString * const kStatOnboardingDlShow= @"OnboardingDeeplinkScreen_show"; +static NSString * const kStatOnboardingDlAccept = @"OnboardingDeeplinkScreen_accept"; static NSString * const kStatOnline = @"online"; static NSString * const kStatOpen = @"Open"; static NSString * const kStatOpenActionSheet = @"Open action sheet"; diff --git a/iphone/Maps/UI/Welcome/DeeplinkInfoViewController.swift b/iphone/Maps/UI/Welcome/DeeplinkInfoViewController.swift index ee1ac5f958..3f3963adc8 100644 --- a/iphone/Maps/UI/Welcome/DeeplinkInfoViewController.swift +++ b/iphone/Maps/UI/Welcome/DeeplinkInfoViewController.swift @@ -27,9 +27,13 @@ class DeeplinkInfoViewController: UIViewController { default: break } + + Statistics.logEvent(kStatOnboardingDlShow, withParameters: [kStatType : host]) } @IBAction func onNextButton(_ sender: UIButton) { delegate?.deeplinkInfoViewControllerDidFinish(self) + guard let dlUrl = deeplinkURL, let host = dlUrl.host else { return } + Statistics.logEvent(kStatOnboardingDlAccept, withParameters: [kStatType : host]) } } |