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 isuserbehavior. Cannot contain underscore "_".Custom logs with the same
bizTypeare stored in a local file namedTimestamp_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 inparamscorresponds 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);