[iOS] Added statistics for outdoor in Place Page
This commit is contained in:
parent
2b0a743397
commit
f551d40140
4 changed files with 23 additions and 6 deletions
|
@ -324,6 +324,7 @@ static NSString * const kStatOverview = @"overview";
|
|||
static NSString * const kStatPedestrian = @"Pedestrian";
|
||||
static NSString * const kStatPhone = @"Phone";
|
||||
static NSString * const kStatPlacePage = @"placepage";
|
||||
static NSString * const kStatPlacePageOutdoor = @"placepage_outdoor";
|
||||
static NSString * const kStatPlacePageToponims = @"placepage_large_toponyms";
|
||||
static NSString * const kStatPlacePageSightSeeing = @"placepage_sightseeings";
|
||||
static NSString * const kStatPlacePageBannerBlank = @"Placepage_Banner_blank";
|
||||
|
|
|
@ -279,6 +279,7 @@ typedef void (^RefreshPromoCallbackBlock)(NSIndexSet *insertedSections);
|
|||
- (RoadWarningMarkType)roadType;
|
||||
- (BOOL)isPreviewPlus;
|
||||
- (BOOL)isPartnerAppInstalled;
|
||||
- (nonnull NSString*)statPlacement;
|
||||
|
||||
+ (UgcSummaryRatingType)ratingValueType:(place_page::rating::Impress)impress;
|
||||
|
||||
|
|
|
@ -846,7 +846,22 @@ NSString * const kUserDefaultsLatLonAsDMSKey = @"UserDefaultsLatLonAsDMS";
|
|||
return [UIApplication.sharedApplication canOpenURL:self.deepLink];
|
||||
}
|
||||
|
||||
+ (UgcSummaryRatingType)ratingValueType:(rating::Impress)impress
|
||||
- (nonnull NSString*)statPlacement
|
||||
{
|
||||
switch (m_info.GetSponsoredType())
|
||||
{
|
||||
case SponsoredType::PromoCatalogCity:
|
||||
return kStatPlacePageToponims;
|
||||
case SponsoredType::PromoCatalogSightseeings:
|
||||
return kStatPlacePageSightSeeing;
|
||||
case SponsoredType:: PromoCatalogOutdoor:
|
||||
return kStatPlacePageOutdoor;
|
||||
default:
|
||||
return kStatUnknownError;
|
||||
}
|
||||
}
|
||||
|
||||
+ (MWMRatingSummaryViewValueType)ratingValueType:(rating::Impress)impress
|
||||
{
|
||||
switch (impress)
|
||||
{
|
||||
|
@ -930,7 +945,7 @@ NSString * const kUserDefaultsLatLonAsDMSKey = @"UserDefaultsLatLonAsDMS";
|
|||
[Statistics logEvent:kStatPlacepageSponsoredShow
|
||||
withParameters:@{
|
||||
kStatProvider: kStatMapsmeGuides,
|
||||
kStatPlacement: self.isLargeToponym ? kStatPlacePageToponims : kStatPlacePageSightSeeing,
|
||||
kStatPlacement: [self statPlacement],
|
||||
kStatState: kStatOnline,
|
||||
kStatCount: @(cityGallery.m_items.size())
|
||||
}];
|
||||
|
|
|
@ -630,7 +630,7 @@ std::map<MetainfoRows, Class> const kMetaInfoCells = {
|
|||
[Statistics logEvent:kStatPlacepageSponsoredItemSelected
|
||||
withParameters:@{
|
||||
kStatProvider: kStatMapsmeGuides,
|
||||
kStatPlacement: kStatPlacePageSightSeeing,
|
||||
kStatPlacement: [self.data statPlacement],
|
||||
kStatItem: @(0),
|
||||
kStatDestination: kStatCatalogue
|
||||
}];
|
||||
|
@ -643,7 +643,7 @@ std::map<MetainfoRows, Class> const kMetaInfoCells = {
|
|||
[Statistics logEvent:kStatPlacepageSponsoredItemSelected
|
||||
withParameters:@{
|
||||
kStatProvider: kStatMapsmeGuides,
|
||||
kStatPlacement: kStatPlacePageSightSeeing,
|
||||
kStatPlacement: [self.data statPlacement],
|
||||
kStatItem: @(0),
|
||||
kStatDestination: kStatCatalogue
|
||||
}];
|
||||
|
@ -895,7 +895,7 @@ std::map<MetainfoRows, Class> const kMetaInfoCells = {
|
|||
[Statistics logEvent:kStatPlacepageSponsoredMoreSelected
|
||||
withParameters:@{
|
||||
kStatProvider: kStatMapsmeGuides,
|
||||
kStatPlacement: self.data.isLargeToponym ? kStatPlacePageToponims : kStatPlacePageSightSeeing,
|
||||
kStatPlacement: [self.data statPlacement],
|
||||
}];
|
||||
} else {
|
||||
promo::CityGallery::Item const &item = [self.data.promoGallery galleryItemAtIndex:indexPath.row];
|
||||
|
@ -908,7 +908,7 @@ std::map<MetainfoRows, Class> const kMetaInfoCells = {
|
|||
[Statistics logEvent:kStatPlacepageSponsoredItemSelected
|
||||
withParameters:@{
|
||||
kStatProvider: kStatMapsmeGuides,
|
||||
kStatPlacement: self.data.isLargeToponym ? kStatPlacePageToponims : kStatPlacePageSightSeeing,
|
||||
kStatPlacement: [self.data statPlacement],
|
||||
kStatItem: @(indexPath.item + 1),
|
||||
kStatDestination: kStatCatalogue
|
||||
}];
|
||||
|
|
Reference in a new issue