[iOS] fix stats for elevation profile

This commit is contained in:
Aleksey Belousov 2020-04-10 17:02:45 +03:00 committed by Vladimir Byko-Ianko
parent 545dd2afda
commit 5ea074b1ef

View file

@ -6,9 +6,6 @@ protocol ElevationProfilePresenterProtocol: UICollectionViewDataSource, UICollec
func onDissapear()
func onDifficultyButtonPressed()
func onDragBegin()
func onZoomBegin()
func onNavigateBegin()
func onSelectedPointChanged(_ point: CGFloat)
}
@ -92,42 +89,18 @@ extension ElevationProfilePresenter: ElevationProfilePresenterProtocol {
}
func onAppear() {
Statistics.logEvent(kStatElevationProfilePageOpen,
withParameters: [/*kStatServerId: data.serverId,*/ //TODO: clarify
kStatMethod: "info|track",
kStatState: "preview"])
Statistics.logEvent(kStatElevationProfilePageOpen, withParameters: [kStatServerId: data.trackId,
kStatState: "preview"])
}
func onDissapear() {
Statistics.logEvent(kStatElevationProfilePageClose,
withParameters: [/*kStatServerId: data.serverId,*/ //TODO: clarify
kStatMethod: "swipe"])
Statistics.logEvent(kStatElevationProfilePageClose, withParameters: [kStatServerId: data.trackId])
}
func onDifficultyButtonPressed() {
delegate?.openDifficultyPopup()
}
func onDragBegin() {
Statistics.logEvent(kStatElevationProfilePageDrag,
withParameters: [/*kStatServerId: data.serverId,*/ //TODO: clarify
kStatAction: "zoom_in|zoom_out|drag",
kStatSide: "left|right|all"])
}
func onZoomBegin() {
Statistics.logEvent(kStatElevationProfilePageZoom,
withParameters: [/*kStatServerId: data.serverId,*/ //TODO: clarify
kStatIsZoomIn: true])
}
func onNavigateBegin() {
Statistics.logEvent(kStatElevationProfilePageNavigationAction,
withParameters: [/*kStatServerId: data.serverId,*/ //TODO: clarify
:])
}
func onSelectedPointChanged(_ point: CGFloat) {
let x1 = Int(floor(point))
let x2 = Int(ceil(point))