Concepts
Device data collected
Exactly what device data the SDK sends, which part you can turn off with minimal mode, what it never collects, and how Herald derives country.
Device data is the information about the app, the operating system and the device that the SDK attaches to every batch it sends. It comes in two tiers: data the SDK always sends, and data it sends by default that you can turn off.
Always sent
| Data | Wire field | Example |
|---|---|---|
| Device ID (a random UUID the SDK creates) | deviceId | 6c1f2a90-… |
| App name, version, build and bundle ID or package name | context.app | Lumen, 4.2.0, 812, com.lumen.app |
| Build kind (iOS 0.5.0+): Xcode or development build, TestFlight or App Store; left out until the SDK knows it | context.app.distribution | development, testflight, appstore |
| OS name and version | context.os | iOS, 18.1 |
| Region setting (the device's locale region code) | context.region | US |
| SDK name and version | sdk | herald-ios, 0.4.0 |
| Session start and end, with duration | session_start, session_end events | durationSeconds: 412 |
| Message interactions: impressions, clicks, dismissals, push opens | interaction events | content_card, click |
Sent by default, off in minimal mode
| Data | Wire field | Values |
|---|---|---|
| Device manufacturer, model and type | context.device | Apple, iPhone16,1, phone (also tablet; iOS can report desktop, tv, car, headset) |
| Screen width, height and density | context.screen | Points on iOS, dp on Android, plus the scale factor |
| Locale | context.locale | en-US |
| Language | context.language | en |
| Time zone (IANA name) | context.timezone | America/Chicago |
| Network type | context.network.type | wifi, cellular, ethernet, other, none |
| Notification permission | context.push.authorization | iOS: authorized, denied, provisional, ephemeral, not_determined. Android: authorized, denied, and on Android 13 and later not_determined until the app has asked through requestPushAuthorization |
In minimal mode these keys are left out of the batch entirely, not sent as empty values.
Sent only when your app calls the SDK
- Events, screens, purchases and attributes you record.
- Email and phone number (
setEmail,setPhone). - Crash and hang reports on iOS, only when you set
crashReportstotrue. They carry no user id and no device id. See iOS API. - The push token: when you pass it to
setPushTokenon iOS, or automatically fromherald-fcmon Android. - Location: only the coordinates you pass to
setLocation(latitude:longitude:). The SDK never reads location itself. - Geofence crossings (SDK 0.7.0+):
$geofence_enterand$geofence_exitwith the geofence's id and name, only after your app adds the geofence module and callsenableGeofences(). No coordinates. See Geofences.
Never collected
- Advertising identifiers: IDFA on iOS, the advertising ID (GAID) on Android.
- Vendor and hardware identifiers: IDFV, Android ID.
- Precise or coarse location from the operating system. With geofences on, the operating system watches the geofences on the device; the SDK sends only crossings.
- Contacts, photos or other personal content.
- Mobile carrier.
Turn on minimal mode
swift
Herald.configure(appKey: "YOUR_APP_KEY", endpoint: URL(string: "https://YOUR_HERALD_HOST")!) { options in
options.deviceDataCollection = .minimal
}kotlin
Herald.configure(
this,
appKey = "YOUR_APP_KEY",
endpoint = "https://YOUR_HERALD_HOST",
options = HeraldOptions(deviceDataCollection = DeviceDataCollection.MINIMAL),
)Herald keeps only the latest device data for each device and replaces it with every batch. Switching an app to minimal mode removes the stored second-tier data the next time the device sends a batch.
How Herald uses device data
- Country. Herald takes the country of the request from its hosting edge when it is a two-letter code. When it is not available, it uses the device's region setting. The region setting is a user preference, not a location, so treat country as approximate. Herald stores the country on the device record; it does not store the request's IP address with SDK data.
- Time zone. For an identified, verified user, Herald fills the profile's time zone from the device only when the profile has none. A time zone synced from your warehouse always wins.
- Notification permission. The latest value is stored on the device record with the rest of the context.