[statistics] statistics for search mark unavailability is added.

This commit is contained in:
Arsentiy Milchakov 2020-08-04 17:10:05 +03:00 committed by Anatoliy V. Tomilov
parent 78ac08e3d1
commit 393292b3aa

View file

@ -19,6 +19,8 @@
#include <array>
#include <limits>
#include "3party/Alohalytics/src/alohalytics.h"
namespace
{
enum class SearchMarkType
@ -715,7 +717,14 @@ void SearchMarks::OnActivate(FeatureID const & featureId)
if (unavailableIt != m_unavailable.cend())
{
mark->SetAvailable(false);
mark->SetReason(platform::GetLocalizedString(unavailableIt->second));
auto const & reasonKey = unavailableIt->second;
if (!reasonKey.empty())
{
mark->SetReason(platform::GetLocalizedString(reasonKey));
alohalytics::Stats::Instance().LogEvent("Search_Map_Notification", {{"message", reasonKey}});
}
}
});
}