This topic describes the types of log instrumentation used in Mobile Analytics.
Information collection
Mobile Analytics relies on instrumented logs reported by the client. To provide accurate and detailed analysis, instrumented logs collect the following device information: public IP address, IMEI, IMSI, device model, system version, network type (such as Wi-Fi, 3G, or 4G), operating system language, number of CPU cores, CPU speed, memory size, screen resolution, client channel ID, and client version number.
Instrumented log model
Different types of logs have different formats. A log is a comma-separated string. Each position in the string represents a different piece of information. The server chunks the log based on these positions.
Common instrumentation types are as follows:
Android and iOS instrumentation
Custom event instrumentation: Records operations such as button and link clicks. You can instrument any action trigger in your app. This is used for features such as custom event analysis and funnel analysis.
Activation instrumentation: Records app startup operations. This includes cold starts or when the app returns to the foreground after being in the background. It is used to calculate core metrics such as the number of startups, new users, active users, and active accounts.
On Android, an activation is recorded by default when an app returns to the foreground after being in the background for more than 30 minutes.
On iOS, an activation is recorded by default each time the app returns to the foreground. To change the reporting interval to 30 minutes, set the return value of
[[DTFrameworkInterface sharedInstance] logReportActiveMinInterval];to 1800.
Automatic page instrumentation: Automatically records information such as page opens, sources, and visit duration. It is used to analyze metrics such as page PV, UV, and flow analysis charts.
Background instrumentation: Records when the app switches between the foreground and background. It is used to analyze metrics such as user session duration and active time.
Startup speed instrumentation: Records the app startup speed. It distinguishes between the first startup (the first time the app is launched after installation) and subsequent startups (launching the app after the first installation).
Freeze instrumentation: Records app freezes and related error logs. This includes the following situations:
Android startup freeze: The app fails to navigate from the welcome page to the home page within 30 seconds of startup.
Android ANR freeze: A system Application Not Responding (ANR) freeze. For more information, see ANRs on the official Android website.
iOS startup freeze: The main thread fails to execute a method within 5 seconds during app startup.
iOS ANR freeze: The main thread fails to execute a method within 5 seconds while the app is running.
Stuttering instrumentation: Records app stuttering and related error logs. Stuttering occurs when the main thread fails to execute a method within a specific time (2.25 seconds for Android and 2 seconds for iOS).
Crash instrumentation: Records app crashes and error stacks.
H5 and PC instrumentation
Page instrumentation: Automatically records information such as webpage opens and sources. It is used to calculate metrics such as page PV, UV, and flow analysis charts.
Click instrumentation: Records clicks on a button or link on a webpage.
Exposure instrumentation: Records the exposure of a specific content segment on a webpage.