diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2015-03-24 19:06:35 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:40:54 +0300 |
commit | 13afbf8d4f5162c2de5c08fbb5073c43e5eb9eab (patch) | |
tree | 8124b5bc4a37db29c6187d52fe20c0dedc588cd9 /map/location_state.cpp | |
parent | 1a07605dd27b6cc0f1a625ce5a26b29adf667069 (diff) |
[ios] Log interface clicks with Alohalytics.
Diffstat (limited to 'map/location_state.cpp')
-rw-r--r-- | map/location_state.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/map/location_state.cpp b/map/location_state.cpp index dea8915593..674636959f 100644 --- a/map/location_state.cpp +++ b/map/location_state.cpp @@ -24,6 +24,7 @@ #include "../geometry/rect2d.hpp" #include "../geometry/transformations.hpp" +#include "../../3party/Alohalytics/src/alohalytics.h" namespace location @@ -306,23 +307,29 @@ bool State::IsModeHasPosition() const void State::SwitchToNextMode() { + string const kAlohalyticsClickEvent = "$onClick"; Mode currentMode = GetMode(); Mode newMode = currentMode; + if (!IsInRouting()) { switch (currentMode) { case UnknownPosition: + alohalytics::LogEvent(kAlohalyticsClickEvent, "@UnknownPosition"); newMode = PendingPosition; break; case PendingPosition: + alohalytics::LogEvent(kAlohalyticsClickEvent, "@PendingPosition"); newMode = UnknownPosition; m_afterPendingMode = Follow; break; case NotFollow: + alohalytics::LogEvent(kAlohalyticsClickEvent, "@NotFollow"); newMode = Follow; break; case Follow: + alohalytics::LogEvent(kAlohalyticsClickEvent, "@Follow"); if (IsRotationActive()) newMode = RotateAndFollow; else @@ -332,11 +339,10 @@ void State::SwitchToNextMode() } break; case RotateAndFollow: - { - newMode = UnknownPosition; - m_afterPendingMode = Follow; - break; - } + alohalytics::LogEvent(kAlohalyticsClickEvent, "@RotateAndFollow"); + newMode = UnknownPosition; + m_afterPendingMode = Follow; + break; } } else |