forked from organicmaps/organicmaps
[iOS] Statistic events for search tabs
This commit is contained in:
parent
8f7bbd952b
commit
39ba8fc18e
2 changed files with 10 additions and 0 deletions
|
@ -359,6 +359,7 @@ static NSString * const kStatSearchFilterReset = @"Search_Filter_Reset";
|
|||
static NSString * const kStatSearchRestaurants = @"Search.Restaurants";
|
||||
static NSString * const kStatSearchSponsoredSelect = @"Search_SponsoredCategory_selected";
|
||||
static NSString * const kStatSearchSponsoredShow = @"Search_SponsoredCategory_shown";
|
||||
static NSString * const kStatSearchTabSelected = @"Search_Tab_selected";
|
||||
static NSString * const kStatSelectMap = @"Select map";
|
||||
static NSString * const kStatSelectResult = @"Select result";
|
||||
static NSString * const kStatSelectTab = @"Select tab";
|
||||
|
@ -388,6 +389,7 @@ static NSString * const kStatState = @"state";
|
|||
static NSString * const kStatSwapRoutingPoints = @"Swap routing points";
|
||||
static NSString * const kStatTTS = @"TTS";
|
||||
static NSString * const kStatTTSSettings = @"TTS settings";
|
||||
static NSString * const kStatTab = @"tab";
|
||||
static NSString * const kStatTable = @"Table";
|
||||
static NSString * const kStatTags = @"tags";
|
||||
static NSString * const kStatTaxi = @"Taxi";
|
||||
|
|
|
@ -47,6 +47,7 @@ final class SearchTabViewController: TabViewController {
|
|||
tabView.tintColor = .white()
|
||||
tabView.headerTextAttributes = [.foregroundColor: UIColor.whitePrimaryText(),
|
||||
.font: UIFont.medium14()]
|
||||
tabView.delegate = self
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
|
@ -69,3 +70,10 @@ extension SearchTabViewController: SearchHistoryViewControllerDelegate {
|
|||
delegate?.searchTabController(self, didSearch: query)
|
||||
}
|
||||
}
|
||||
|
||||
extension SearchTabViewController: TabViewDelegate {
|
||||
func tabView(_ tabView: TabView, didSelectTabAt index: Int) {
|
||||
let selectedTab = index == 0 ? kStatHistory.uppercased() : kStatCategories.uppercased()
|
||||
Statistics.logEvent(kStatSearchTabSelected, withParameters: [kStatTab : selectedTab])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue