All Products
Document Center

Custom event log

Last Updated: Jan 12, 2021

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.


The event tracking code is as follows:

  1. 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 userbehavor.
    • 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:

  1. MPLogger.event(String logId);
  2. MPLogger.event(String logId, String bizType);
  3. MPLogger.event(String logId, Map<String, String> params);