Skip to content
Menu

Concepts

Device data collected

Markdown version

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

DataWire fieldExample
Device ID (a random UUID the SDK creates)deviceId6c1f2a90-…
App name, version, build and bundle ID or package namecontext.appLumen, 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 itcontext.app.distributiondevelopment, testflight, appstore
OS name and versioncontext.osiOS, 18.1
Region setting (the device's locale region code)context.regionUS
SDK name and versionsdkherald-ios, 0.4.0
Session start and end, with durationsession_start, session_end eventsdurationSeconds: 412
Message interactions: impressions, clicks, dismissals, push opensinteraction eventscontent_card, click

Sent by default, off in minimal mode

DataWire fieldValues
Device manufacturer, model and typecontext.deviceApple, iPhone16,1, phone (also tablet; iOS can report desktop, tv, car, headset)
Screen width, height and densitycontext.screenPoints on iOS, dp on Android, plus the scale factor
Localecontext.localeen-US
Languagecontext.languageen
Time zone (IANA name)context.timezoneAmerica/Chicago
Network typecontext.network.typewifi, cellular, ethernet, other, none
Notification permissioncontext.push.authorizationiOS: 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 crashReports to true. They carry no user id and no device id. See iOS API.
  • The push token: when you pass it to setPushToken on iOS, or automatically from herald-fcm on Android.
  • Location: only the coordinates you pass to setLocation(latitude:longitude:). The SDK never reads location itself.
  • Geofence crossings (SDK 0.7.0+): $geofence_enter and $geofence_exit with the geofence's id and name, only after your app adds the geofence module and calls enableGeofences(). 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
}

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.

See Herald decide live →