简体   繁体   中英

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.

Is there something like that in Huawei AppGallery Connect?

So far all I can do is tweak around the dates and some metrics.

Only enable Analytics service is not enough. You need to add Analytics Kit to your Android/iOS App, and then Analytics data from AppGallery Connect can be obtained.

The procedure of HA integration is simple. 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. For details, see docs .

  • HUAWEI Analytics Kit Development Process:
  1. After adding your app to AppGallery Connect, please enable Analytics service to usage.
  2. After completing the enabling process, go to the manage API tab from the project settings, activate the Analytics service.
  3. Add the json file on the project settings page to your project and add HMS SDK dependencies to your project. Add build dependencies in the dependencies section.
dependencies {
    implementation 'com.huawei.hms:hianalytics:5.0.5.300'
}
  1. After the agconnect-services.json file is imported successfully, initialize Analytics Kit in the onCreate method of the first activity to obtain a HiAnalyticsInstance instance. If the agconnect-services.json file is incorrect, data cannot be collected at specified trigger points.
@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"); 
}
  1. Add triggers of the custom event in proper positions of the code.
// 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM