Skip to content

Commit

Permalink
Merge pull request #619 from igrechuhin/ig-master
Browse files Browse the repository at this point in the history
[ios] Updated statistics logging.
  • Loading branch information
vmihaylenko committed Nov 20, 2015
2 parents 437d7b6 + f02034b commit 4112235
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions iphone/Maps/MWMTTSSettingsViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
else if (indexPath.section == 1)
{
[[Statistics instance] logEvent:kStatEventName(kStatTTSSettings, kStatHelp)];
NSString * path = [[NSBundle mainBundle] pathForResource:@"tts-how-to-set-up-voice" ofType:@"html"];
NSString * html = [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
NSURL * baseURL = [NSURL fileURLWithPath:path];
Expand Down
4 changes: 4 additions & 0 deletions iphone/Maps/Statistics/Statistics.mm
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ - (void)logEvent:(NSString *)eventName withParameters:(NSDictionary *)parameters
params[kStatDeviceType] = IPAD ? kStatiPad : kStatiPhone;
BOOL isLandscape = UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation);
params[kStatOrientation] = isLandscape ? kStatLandscape : kStatPortrait;
AppInfo * info = [AppInfo sharedInfo];
params[kStatCountry] = info.countryCode;
if (info.languageId)
params[kStatLanguage] = info.languageId;
[Flurry logEvent:eventName withParameters:parameters];
[Alohalytics logEvent:eventName withDictionary:parameters];
}
Expand Down
1 change: 1 addition & 0 deletions iphone/Maps/Statistics/StatisticsStrings.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static NSString * const kStatIn = @"In";
static NSString * const kStatKML = @"KML";
static NSString * const kStatKilometers = @"Kilometers";
static NSString * const kStatLandscape = @"Landscape";
static NSString * const kStatLanguage = @"Language";
static NSString * const kStatLocation = @"Location";
static NSString * const kStatMap = @"Map search";
static NSString * const kStatMenu = @"Menu";
Expand Down

0 comments on commit 4112235

Please sign in to comment.