From e3f3a70080d4f98ae634c8f2c59dd16614347111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=93=D1=80=D0=B5=D1=87=D1=83?= =?UTF-8?q?=D1=85=D0=B8=D0=BD?= Date: Fri, 20 Nov 2015 16:58:48 +0300 Subject: [PATCH] [ios] Updated statistics logging. --- .../TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm | 2 +- .../Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm | 6 +++--- .../Search/TableView/MWMSearchTableViewController.mm | 2 +- iphone/Maps/Statistics/StatisticsStrings.h | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm index 263c40f91f..13ee5e2404 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm @@ -56,7 +56,7 @@ forRowAtIndexPath:(NSIndexPath *)indexPath { NSString * string = @(categoriesNames[indexPath.row]); [[Statistics instance] logEvent:kStatEventName(kStatSearch, kStatSelectResult) - withParameters:@{kStatValue : string}]; + withParameters:@{kStatValue : string, kStatScreen : kStatCategories}]; [self.delegate searchText:[L(string) stringByAppendingString:@" "] forInputLocale:nil]; } diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm index 9690e120d0..39d9fa1e96 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm @@ -146,7 +146,7 @@ forRowAtIndexPath:(NSIndexPath *)indexPath search::QuerySaver::TSearchRequest const & query = [self queryAtIndex:isRouteSearch ? indexPath.row - 1 : indexPath.row]; NSString * queryText = @(query.second.c_str()); [[Statistics instance] logEvent:kStatEventName(kStatSearch, kStatSelectResult) - withParameters:@{kStatValue : queryText}]; + withParameters:@{kStatValue : queryText, kStatScreen : kStatHistory}]; [self.delegate searchText:queryText forInputLocale:@(query.first.c_str())]; } else @@ -154,12 +154,12 @@ forRowAtIndexPath:(NSIndexPath *)indexPath if (isRouteSearch) { [[Statistics instance] logEvent:kStatEventName(kStatSearch, kStatSelectResult) - withParameters:@{kStatValue : kStatMyPosition}]; + withParameters:@{kStatValue : kStatMyPosition, kStatScreen : kStatHistory}]; [self.delegate tapMyPositionFromHistory]; return; } [[Statistics instance] logEvent:kStatEventName(kStatSearch, kStatSelectResult) - withParameters:@{kStatValue : kStatClear}]; + withParameters:@{kStatValue : kStatClear, kStatScreen : kStatHistory}]; f.ClearSearchHistory(); MWMSearchTabbedCollectionViewCell * cell = self.cell; [UIView animateWithDuration:kDefaultAnimationDuration animations:^ diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.mm index 8d047544f0..a1ea60e4d8 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchTableViewController.mm @@ -240,7 +240,7 @@ forRowAtIndexPath:(NSIndexPath *)indexPath { NSString * suggestionString = @(result.GetSuggestionString()); [[Statistics instance] logEvent:kStatEventName(kStatSearch, kStatSelectResult) - withParameters:@{kStatValue : suggestionString}]; + withParameters:@{kStatValue : suggestionString, kStatScreen : kStatSearch}]; [self.delegate searchText:suggestionString forInputLocale:nil]; } else diff --git a/iphone/Maps/Statistics/StatisticsStrings.h b/iphone/Maps/Statistics/StatisticsStrings.h index 52cb398f28..08879c15a5 100644 --- a/iphone/Maps/Statistics/StatisticsStrings.h +++ b/iphone/Maps/Statistics/StatisticsStrings.h @@ -82,6 +82,7 @@ static NSString * const kStatRegular = @"Regular"; static NSString * const kStatRemove = @"Remove"; static NSString * const kStatRename = @"Rename"; static NSString * const kStatReport = @"Report"; +static NSString * const kStatScreen = @"Screen"; static NSString * const kStatSearch = @"Search"; static NSString * const kStatSearchEnteredState = @"Search entered state"; static NSString * const kStatSelectMap = @"Select map";