On this page
App analytics needs Pro or above; Free covers websites only.
Supported platforms
- Native: iOS (13 and later), Android (minSdk 21), HarmonyOS.
- Cross-platform: Flutter, React Native, uni-app.
- Apps can share a project with your website and mini programs, and reports show platforms separately or combined.
What each SDK records on its own varies a little. iOS captures uncaught exceptions automatically, for example, while the current Android SDK needs you to forward lifecycle events and report crashes from your start-up code. The setup wizard in the console explains each platform.
Four steps
1. Register the app identifier
Under App analytics › Configuration › SDK code, add the identifier: the Bundle ID on iOS, the package name on Android, the bundle name on HarmonyOS. It must match the installed package exactly. Mismatched data is rejected without an error.
2. Install the SDK from the wizard
The same page shows install commands and initialisation code for the platform you pick, with your site key and collection address filled in. Copy them as they are; the wizard has the current version numbers.
3. Pre-initialise first, initialise after consent
The SDK starts in two steps:
- Pre-initialise stores the configuration and sends nothing. Do it as early as possible at launch.
- Initialise starts collecting and sending. Call it after the user accepts your privacy policy.
App stores in mainland China require that nothing is collected before the user consents. With the project's China mode on, the SDK collects nothing until consent is granted. We suggest this order for apps everywhere, so a later change of privacy policy doesn't need a code change.
4. Cold-start once on a device
Install on a device or simulator, quit the app completely and open it again. If App analytics › Real-time shows a launch, you are connected.
No data?
Check in this order:
- The identifier matches the installed package, including letter case.
- The plan includes app platforms.
- Initialisation wasn't called before consent — or, in China mode, consent hasn't been granted yet.
- The remote switch in the console hasn't been turned off (see below).
Remote configuration without a new release
Shipping a code change to an app means another store review, so some collection switches live in the console and the SDK fetches them at launch:
- Master switch — sending stops; the local queue is kept.
- Sampling — 1% to 100%, stable per device, so a device isn't in one day and out the next.
- Upload interval and batch size.
- Event and device block lists.
- Minimum SDK version — older installs stop sending.
Find them on the remote configuration card under App analytics › Configuration › SDK code. Changes apply at the next cold start or when the cached copy expires (one day by default). Today the Flutter, React Native, uni-app, HarmonyOS and mini-program SDKs read this configuration; the current native iOS and Android SDKs don't yet.
Excluding test devices
Exclude by device or version under App analytics › Configuration › App settings. Versions accept a trailing wildcard: 0.9.* excludes every beta build.
Next
- App reports: new users, retention, versions and crashes
- Custom events in apps follow the same naming rules as the web — see Custom events