All Products
Search
Document Center

Mobile Platform as a Service:Custom event log

Last Updated:Sep 07, 2023

You can customize event tracking for user behavior analysis based on business needs.

After connecting a client to mPaaS, you need to log in to the mPaaS console, choose Mobile Analysis Service > Custom analysis > Custom configurations, and configure the relevant attributes and events. Then, you can choose Custom analysis > Event analysis to view relevant data. For more information, see Custom analysis.

Tracking

The event tracking code is as follows:

MPLogger.event(String logId, String bizType, Map<String, String> params);
  • logId: specifies the tracking ID, which cannot be empty. It corresponds to the event ID of the event created in the console.

  • bizType: specifies the business type, which can be empty. The default value is userbehavior. Cannot contain underscore "_".

    • Custom logs with the same bizType are stored in a local file named Timestamp_package name-process_bizType.

    • For more information about the naming rules for log files, see Log file name in View local logs.

  • params: indicates extended parameters, which can be empty. The key in params corresponds to the property ID of a property created in the console and the value specifies the value of this property.

You can also use the following code for overloading:

MPLogger.event(String logId);

MPLogger.event(String logId, String bizType);

MPLogger.event(String logId, Map<String, String> params);