Added all-pass subscriptions stats

This commit is contained in:
Dmitry Donskoy 2019-11-22 14:20:13 +03:00 committed by Aleksandr Zatsepin
parent 5b411f8133
commit c1fa463d5a
4 changed files with 23 additions and 2 deletions

View file

@ -84,6 +84,9 @@ class BottomPanel
{
if (mFragment.getAdapter() != null )
mFragment.getAdapter().setAvailableMapsMode();
Statistics.INSTANCE.trackEvent(Statistics.EventName.DOWNLOADER_FAB_CLICK,
Statistics.params().add(Statistics.EventParam.BUTTON,
Statistics.ParamValue.PLUS));
update();
}
});

View file

@ -914,7 +914,7 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
mFragment.update();
}
private boolean canGoUpwards()
boolean canGoUpwards()
{
return !mPath.isEmpty();
}

View file

@ -7,6 +7,7 @@ import android.view.View;
import com.mapswithme.maps.R;
import com.mapswithme.maps.widget.SearchToolbarController;
import com.mapswithme.util.statistics.Statistics;
class DownloaderToolbarController extends SearchToolbarController
{
@ -58,6 +59,18 @@ class DownloaderToolbarController extends SearchToolbarController
mFragment.startActivityForResult(intent, code);
}
@Override
protected void onQueryClick(String query)
{
super.onQueryClick(query);
boolean isDownloadNewMapsMode = mFragment.getAdapter().canGoUpwards();
Statistics.ParameterBuilder params = Statistics
.params().add(Statistics.EventParam.SCREEN, isDownloadNewMapsMode
? Statistics.ParamValue.DOWNLOAD
: Statistics.ParamValue.PLUS);
Statistics.INSTANCE.trackEvent(Statistics.EventName.DOWNLOADER_SEARCH_CLICK, params);
}
@Override
protected boolean supportsVoiceSearch()
{

View file

@ -367,6 +367,8 @@ public enum Statistics
public static final String DOWNLOADER_BANNER_SHOW = "Downloader_Banner_show";
public static final String DOWNLOADER_BANNER_CLICK = "Downloader_Banner_click";
public static final String DOWNLOADER_FAB_CLICK = "Downloader_AddMap_click";
public static final String DOWNLOADER_SEARCH_CLICK = "Downloader_Search_click";
static final String DOWNLOADER_DIALOG_ERROR = "Downloader_OnStartScreen_error";
// bookmarks
@ -602,6 +604,8 @@ public enum Statistics
public static final String SETTINGS = "settings";
public static final String ROUTE = "route";
public static final String SCENARIO = "scenario";
public static final String BUTTON = "button";
public static final String SCREEN = "screen";
static final String TARGET = "target";
static final String CATEGORY = "category";
public static final String TAB = "tab";
@ -662,7 +666,6 @@ public enum Statistics
static final String HAS_AUTH = "has_auth";
public static final String STATUS = "status";
static final String INTERRUPTED = "interrupted";
static final String BUTTON = "button";
static final String VENDOR = "vendor";
static final String PRODUCT = "product";
static final String PURCHASE = "purchase";
@ -698,6 +701,8 @@ public enum Statistics
public static final String SPONSORED_BUTTON = "sponsored_button";
public static final String POPUP = "popup";
public static final String WEBVIEW = "webview";
public static final String PLUS = "plus";
public static final String DOWNLOAD = "download";
static final String GUIDES_SUBSCRIPTION = "GuidesSubscription";
static final String SEARCH_BOOKING_COM = "Search.Booking.Com";
static final String OPENTABLE = "OpenTable";