Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2016-04-29 18:29:50 +0300
committerAlex Zolotarev <alex@maps.me>2016-05-01 10:28:03 +0300
commit098a645f8b7010bfeea5b8e8e338d428f2d8540e (patch)
treeddbbae69230092dedc29ec006018130b26147bf2 /indexer/new_feature_categories.cpp
parentc847bea4e820aa9402069401e34ca3ab6a3a8dc4 (diff)
[editor] Log searches of categories for new features.
Diffstat (limited to 'indexer/new_feature_categories.cpp')
-rw-r--r--indexer/new_feature_categories.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indexer/new_feature_categories.cpp b/indexer/new_feature_categories.cpp
index 24733ed7aa..42cc6a2b7c 100644
--- a/indexer/new_feature_categories.cpp
+++ b/indexer/new_feature_categories.cpp
@@ -8,6 +8,8 @@
#include "std/algorithm.hpp"
+#include "3party/Alohalytics/src/alohalytics.h"
+
namespace osm
{
NewFeatureCategories::NewFeatureCategories(editor::EditorConfig const & config)
@@ -58,8 +60,10 @@ void NewFeatureCategories::AddLanguage(string lang)
m_categoriesByLang[lang] = names;
}
-NewFeatureCategories::TNames NewFeatureCategories::Search(string const & query, string lang) const
+NewFeatureCategories::TNames NewFeatureCategories::Search(string const & query,
+ string const & queryLang) const
{
+ string lang = queryLang;
auto langCode = CategoriesHolder::MapLocaleToInteger(lang);
if (langCode == CategoriesHolder::kUnsupportedLocaleCode)
{
@@ -77,6 +81,11 @@ NewFeatureCategories::TNames NewFeatureCategories::Search(string const & query,
result[i].second = resultTypes[i];
}
my::SortUnique(result);
+
+ alohalytics::TStringMap const stats = {
+ {"query", query}, {"queryLang", queryLang}, {"lang", lang}};
+ alohalytics::LogEvent("searchNewFeatureCategory", stats);
+
return result;
}