feat: 神策数据埋点第二期(3) https://jira.shanqu.cc/browse/GHZS-3182

This commit is contained in:
chenjuntao
2023-08-29 10:35:40 +08:00
parent 70f782cb5c
commit 553f84daa1
109 changed files with 223 additions and 190 deletions

View File

@ -346,24 +346,6 @@ public class DownloadManager implements DownloadStatusListener {
ExtensionsKt.addMetaExtra(downloadEntity, DownloadConfig.KEY_PROGRESS_CALLBACK_INTERVAL, "200");
ExtensionsKt.addMetaExtra(downloadEntity, VHelper.KEY_REQUIRED_G_APPS, gameEntity.getGAppsSwitch());
ExtensionsKt.addMetaExtra(downloadEntity, VHelper.KEY_BIT, apkEntity.getBit());
SensorsBridge.trackEvent("HaloFunGameDownloadClick",
"game_name", gameEntity.getName(),
"game_id", gameEntity.getId(),
"game_schema_type", gameEntity.getGameBitChinese());
} else {
SensorsBridge.trackEvent("DownloadProcessBegin",
"game_id", gameEntity.getId(),
"game_name", gameEntity.getName(),
"game_type", gameEntity.getCategoryChinese(),
"game_schema_type", gameEntity.getGameBitChinese(),
"page_name", GlobalActivityManager.getCurrentPageEntity().getPageName(),
"page_id", GlobalActivityManager.getCurrentPageEntity().getPageId(),
"page_business_id", GlobalActivityManager.getCurrentPageEntity().getPageBusinessId(),
"last_page_name", GlobalActivityManager.getLastPageEntity().getPageName(),
"last_page_id", GlobalActivityManager.getLastPageEntity().getPageId(),
"last_page_business_id", GlobalActivityManager.getLastPageEntity().getPageBusinessId()
);
}
HashMap<String, String> map = PageSwitchDataHelper.popLastPageData();
@ -407,6 +389,28 @@ public class DownloadManager implements DownloadStatusListener {
AppDebugConfig.logMethodWithParams(DownloadManager.class, apkEntity.getUrl(), downloadEntity.getUrl(), method, entrance, location);
}
if (gameEntity.isVGame()) {
SensorsBridge.trackEventWithExposureSource("HaloFunGameDownloadClick",
downloadExposureEvent.getSource(),
"game_name", gameEntity.getName(),
"game_id", gameEntity.getId(),
"game_schema_type", gameEntity.getGameBitChinese());
}
SensorsBridge.trackEventWithExposureSource("DownloadProcessBegin",
downloadExposureEvent.getSource(),
"game_id", gameEntity.getId(),
"game_name", gameEntity.getName(),
"game_type", gameEntity.getCategoryChinese(),
"game_schema_type", gameEntity.getGameBitChinese(),
"page_name", GlobalActivityManager.getCurrentPageEntity().getPageName(),
"page_id", GlobalActivityManager.getCurrentPageEntity().getPageId(),
"page_business_id", GlobalActivityManager.getCurrentPageEntity().getPageBusinessId(),
"last_page_name", GlobalActivityManager.getLastPageEntity().getPageName(),
"last_page_id", GlobalActivityManager.getLastPageEntity().getPageId(),
"last_page_business_id", GlobalActivityManager.getLastPageEntity().getPageBusinessId()
);
//TODO remove
DownloadManager.getInstance().putStatus(downloadEntity.getUrl(), DownloadStatus.downloading);
@ -920,7 +924,7 @@ public class DownloadManager implements DownloadStatusListener {
for (DownloadEntity downloadEntity : getAllDownloadEntity()) {
if (!urlSet.contains(downloadEntity.getUrl())
&& (downloadEntity.getStatus().equals(DownloadStatus.downloading)
|| downloadEntity.getStatus().equals(DownloadStatus.waiting))) {
|| downloadEntity.getStatus().equals(DownloadStatus.waiting))) {
downloadEntity.setStatus(DownloadStatus.subscribe);
mDownloadDao.newOrUpdate(downloadEntity);
NDataChanger.INSTANCE.notifyDataChanged(downloadEntity);