[iOS] update bottom menu stats

This commit is contained in:
Aleksey Belouosv 2018-08-07 20:13:09 +03:00 committed by Aleksey Belousov
parent 8cdc483113
commit ecfe461def
2 changed files with 22 additions and 24 deletions

View file

@ -16,7 +16,7 @@ static NSString * const kStatActionSheet = @"Action sheet";
static NSString * const kStatAd = @"Ad";
static NSString * const kStatAdTitle = @"Ad title";
static NSString * const kStatAdd = @"add";
static NSString * const kStatAddPlace = @"Add place";
static NSString * const kStatAddPlace = @"add_place";
static NSString * const kStatAfterSave = @"after_save";
static NSString * const kStatAlert = @"Alert";
static NSString * const kStatAllMaps = @"all_maps";
@ -38,7 +38,7 @@ static NSString * const kStatBattery = @"battery";
static NSString * const kStatBicycle = @"Bicycle";
static NSString * const kStatBooking = @"Booking.com";
static NSString * const kStatBookmarkCreated = @"Bookmark. Bookmark created";
static NSString * const kStatBookmarks = @"Bookmarks";
static NSString * const kStatBookmarks = @"bookmarks";
static NSString * const kStatBookmarksAuthRequestError = @"Bookmarks_SyncProposal_error";
static NSString * const kStatBookmarksRestoreProposalCancel = @"Bookmarks_RestoreProposal_cancel";
static NSString * const kStatBookmarksRestoreProposalClick = @"Bookmarks_RestoreProposal_click";
@ -51,7 +51,7 @@ static NSString * const kStatBookmarksSyncProposalShown = @"Bookmarks_SyncPropos
static NSString * const kStatBookmarksSyncStarted = @"Bookmarks_sync_started";
static NSString * const kStatBookmarksSyncSuccess = @"Bookmarks_sync_success";
static NSString * const kStatBuildRoute = @"Build route";
static NSString * const kStatButton = @"Button";
static NSString * const kStatButton = @"button";
static NSString * const kStatCallPhoneNumber = @"Call phone number";
static NSString * const kStatCampSite = @"campSite";
static NSString * const kStatCancel = @"cancel";
@ -95,8 +95,9 @@ static NSString * const kStatDiscoveryButtonOpen = @"DiscoveryButton_Open";
static NSString * const kStatDisk = @"disk";
static NSString * const kStatDownload = @"download";
static NSString * const kStatDownloadGroup = @"download_group";
static NSString * const kStatDownloadGuides = @"download_guides";
static NSString * const kStatDownloadMap = @"Download map";
static NSString * const kStatDownloadMaps = @"Download maps";
static NSString * const kStatDownloadMaps = @"download_maps";
static NSString * const kStatDownloadRequest = @"Download request";
static NSString * const kStatDownloadRoute = @"Download route";
static NSString * const kStatDownloader = @"downloader";
@ -184,7 +185,7 @@ static NSString * const kStatMapViewStyle = @"Map view style";
static NSString * const kStatMapViewStyleSettings = @"Map view style settings";
static NSString * const kStatMapsme = @"maps.me";
static NSString * const kStatMaxim = @"Maxim";
static NSString * const kStatMenu = @"Menu";
static NSString * const kStatMenu = @"menu";
static NSString * const kStatMigrationBig2SmallMWM = @"Big mwms to small mwms migration counter";
static NSString * const kStatMiles = @"Miles";
static NSString * const kStatMobile = @"mobile";
@ -250,7 +251,7 @@ static NSString * const kStatPlacepageSponsoredMoreSelected = @"Placepage_Sponso
static NSString * const kStatPlacepageSponsoredOpen = @"Placepage_SponsoredGalleryPage_opened";
static NSString * const kStatPlacepageSponsoredShow = @"Placepage_SponsoredGallery_shown";
static NSString * const kStatPlacepageTaxiShow = @"Placepage_Taxi_show";
static NSString * const kStatPointToPoint = @"Point to point";
static NSString * const kStatPointToPoint = @"point_to_point";
static NSString * const kStatPortrait = @"Portrait";
static NSString * const kStatPosition = @"position";
static NSString * const kStatPriceCategory = @"price_category";
@ -319,10 +320,11 @@ static NSString * const kStatSelectMap = @"Select map";
static NSString * const kStatSelectResult = @"Select result";
static NSString * const kStatSelectTab = @"Select tab";
static NSString * const kStatSendEmail = @"Send email";
static NSString * const kStatSettings = @"Settings";
static NSString * const kStatSettings = @"settings";
static NSString * const kStatSettingsBookmarksSyncToggle = @"Settings_BookmarksSync_toggle";
static NSString * const kStatSettingsOpenSection = @"Settings open section";
static NSString * const kStatShare = @"Share";
static NSString * const kStatShareMyLocation = @"share_my_location";
static NSString * const kStatShowBig2SmallMWM = @"Big mwms to small mwms dialog appearing counter";
static NSString * const kStatShowOnMap = @"Show on map";
static NSString * const kStatSignup = @"Signup";
@ -352,6 +354,8 @@ static NSString * const kStatToggleStatistics = @"Toggle statistics";
static NSString * const kStatToggleTransliteration = @"Toggle transliteration";
static NSString * const kStatToggleVisibility = @"Toggle visibility";
static NSString * const kStatToggleZoomButtonsVisibility = @"Toggle zoom buttons visibility";
static NSString * const kStatToolbarClick = @"Toolbar_click";
static NSString * const kStatToolbarMenuClick = @"Toolbar_Menu_click";
static NSString * const kStatTraffic = @"Traffic";
static NSString * const kStatType = @"type";
static NSString * const kStatUGCReviewAuthDeclined = @"UGC_Auth_declined";

View file

@ -224,7 +224,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
- (void)menuActionAddPlace
{
[Statistics logEvent:kStatEditorAddClick withParameters:@{kStatValue : kStatMenu}];
[Statistics logEvent:kStatToolbarMenuClick withParameters:@{kStatItem : kStatAddPlace}];
GetPlatform().GetMarketingService().SendPushWooshTag(marketing::kEditorAddDiscovered);
self.state = self.restoreState;
[self.delegate addPlace:NO hasPoint:NO point:m2::PointD()];
@ -232,30 +232,28 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
- (void)menuActionDownloadRoutes
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatDownloadRoute}];
[Statistics logEvent:kStatToolbarMenuClick withParameters:@{kStatItem : kStatDownloadGuides}];
self.state = self.restoreState;
[self.mapViewController openCatalogAnimated:YES];
}
- (void)menuActionDownloadMaps
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatDownloadMaps}];
[Statistics logEvent:kStatToolbarMenuClick withParameters:@{kStatItem : kStatDownloadMaps}];
self.state = self.restoreState;
[self.delegate actionDownloadMaps:MWMMapDownloaderModeDownloaded];
}
- (IBAction)menuActionOpenSettings
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatSettings}];
[Statistics logEvent:kStatToolbarMenuClick withParameters:@{kStatItem : kStatSettings}];
self.state = self.restoreState;
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"settingsAndMore"];
[self.mapViewController performSegueWithIdentifier:@"Map2Settings" sender:nil];
}
- (void)menuActionShareLocation
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatShare}];
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"share@"];
[Statistics logEvent:kStatToolbarMenuClick withParameters:@{kStatItem : kStatShareMyLocation}];
CLLocation * lastLocation = [MWMLocationManager lastLocation];
if (!lastLocation)
{
@ -277,7 +275,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
- (IBAction)point2PointButtonTouchUpInside:(UIButton *)sender
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatPointToPoint}];
[Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatPointToPoint}];
BOOL const isSelected = !sender.isSelected;
[MWMRouter enableAutoAddLastLocation:NO];
if (isSelected)
@ -288,8 +286,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
- (IBAction)searchButtonTouchUpInside
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatSearch}];
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"search"];
[Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatSearch}];
self.state = MWMBottomMenuStateInactive;
auto searchManager = [MWMSearchManager manager];
if (searchManager.state == MWMSearchManagerStateHidden)
@ -300,8 +297,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
- (IBAction)discoveryTap
{
[Statistics logEvent:kStatDiscoveryButtonOpen
withParameters:@{kStatNetwork: [Statistics connectionTypeString]}];
[Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatDiscovery}];
self.state = self.restoreState;
@ -313,8 +309,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
- (IBAction)bookmarksButtonTouchUpInside
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatBookmarks}];
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"bookmarks"];
[Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatBookmarks}];
self.state = MWMBottomMenuStateInactive;
[self.mapViewController openBookmarks];
}
@ -327,7 +322,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
case MWMBottomMenuStateInactive:
if ([self.menuView isCompact])
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatRegular}];
[Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatMenu}];
if (IPAD)
{
[MWMSearchManager manager].state = MWMSearchManagerStateHidden;
@ -336,12 +331,11 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
}
else
{
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatExpand}];
[Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatMenu}];
self.state = MWMBottomMenuStateActive;
}
break;
case MWMBottomMenuStateActive:
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatCollapse}];
self.state = MWMBottomMenuStateInactive;
break;
}