Implement custom instrumentation to track and analyze user behavior.
After you connect to the client, configure properties and events in the Mobile Analysis console under Custom Analysis > Custom Configuration, and then view the data under Custom Analysis > Event Analysis. For more information, see Configure custom analysis.
The instrumentation code:
MPLogger.event(String logId, String bizType, Map<String, String> params);
-
logId: Required. The instrumentation ID, which corresponds to the event ID of a new event in the console. -
bizType: Optional. The business type. Default value:userbehavior. The business type cannot contain underscores (_).-
Custom logs with the same
bizTypeare stored in a local file namedtimestamp_package-name-process_bizType. -
For more information about the naming conventions for log files, see View local logs.
-
-
params: Optional. Extension parameters. The key corresponds to the property ID of a new property in the console, and the value is the property value.
Overloaded methods:
MPLogger.event(String logId);
MPLogger.event(String logId, String bizType);
MPLogger.event(String logId, Map<String, String> params);