[英]How can I download my app's analytics from Huawei AppGallery Connect?
Was expecting something similar to Google PlayStore Console where you can just slap dates and metrics and then download the csv file.期待类似于 Google PlayStore Console 的东西,您可以在其中设置日期和指标,然后下载 csv 文件。
Is there something like that in Huawei AppGallery Connect?华为AppGallery Connect中是否有类似的东西?
So far all I can do is tweak around the dates and some metrics.到目前为止,我所能做的就是调整日期和一些指标。
Only enable Analytics service is not enough.仅启用 Analytics 服务是不够的。 You need to add Analytics Kit to your Android/iOS App, and then Analytics data from AppGallery Connect can be obtained.您需要将 Analytics Kit 添加到您的 Android/iOS 应用程序中,然后才能从 AppGallery Connect 获取 Analytics 数据。
The procedure of HA integration is simple. HA 集成的过程很简单。 You can refer to the following steps or documentation .您可以参考以下步骤或文档。 After integration, you can download the data in the lower right corner of the Analytics page.集成后,您可以在分析页面的右下角下载数据。
Analytics Kit provides server APIs for you to export event data collected on devices and import the data to your BI system for unified data analysis. Analytics Kit 提供服务器 API 供您导出在设备上收集的事件数据并将数据导入您的 BI 系统以进行统一的数据分析。 For details, see docs .有关详细信息,请参阅文档。
dependencies {
implementation 'com.huawei.hms:hianalytics:5.0.5.300'
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Enable SDK log recording.
HiAnalyticsTools.enableLog();
HiAnalyticsInstance instance = HiAnalytics.getInstance(this);
// Or use the context for initialization.
Context context = this.getApplicationContext();
HiAnalyticsInstance instance = HiAnalytics.getInstance(context);
instance.setUserProfile("userKey","value");
}
// Add triggers of custom events in proper positions of the code.
Bundle bundle = new Bundle();
bundle.putString("exam_difficulty","high");
bundle.putString("exam_level","1-1");
bundle.putString("exam_time","20190520-08");
instance.onEvent("begin_examination", bundle);
// Add triggers of predefined events in proper positions of the code.
Bundle bundle_pre = new Bundle();
bundle_pre.putString(PRODUCTID, "item_ID");
bundle_pre.putString(PRODUCTNAME, "name");
bundle_pre.putString(CATEGORY, "category");
bundle_pre.putLong(QUANTITY, 100L);
bundle_pre.putDouble(PRICE, 10.01);
bundle_pre.putDouble(REVENUE, 10);
bundle_pre.putString(CURRNAME, "currency");
bundle_pre.putString(PLACEID, "location_ID");
instance.onEvent(ADDPRODUCT2WISHLIST, bundle_pre);
During the development, you can enable the debug mode to view the event records in real time, observe the results, and adjust the event reporting policies.开发过程中可以开启debug模式,实时查看事件记录,观察结果,调整事件上报策略。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.