Skip to main content

Platform and application data tracking

Platform and application data tracking features capture information about the device and the app.

They are enabled by default. But the setting can be changed through TrackerConfiguration like in the example below:

const tracker = createTracker(
'appTracker',
{
endpoint: COLLECTOR_URL,
},
{
trackerConfig: {
applicationContext: true,
platformContext: true,
},
}
);

Application context

The application context entity contains two properties:

PropertyTypeDescriptionRequired in schema
versionStringVersion number of the application e.g 1.1.0Yes
buildStringBuild name of the application e.g s9f2k2d or 1.1.0 betaYes

Platform context

The platform context entity contains the following properties:

PropertyTypeDescriptionRequired in schema
osTypeStringType of the operating system (e.g., "ios", "tvos", "watchos", "osx", "android")Yes
osVersionStringVersion of the mobile operating system.Yes
deviceManufacturerStringDevice vendor.Yes
deviceModelStringModel of the device.Yes
carrierStringCarrier of the SIM inserted in the device.No
networkTypeStringOne of: "mobile", "wifi", "offline"No
networkTechnologyStringRadio access technology that the device is using.No
openIdfaStringDeprecated property.No
appleIdfaStringAdvertising identifier on iOS.No
appleIdfvStringUUID identifier for vendors on iOS.No
androidIdfaStringAdvertising identifier on Android.No
physicalMemoryIntegerTotal physical system memory in bytesNo
systemAvailableMemoryIntegerAvailable memory on the system in bytes (Android only)No
appAvailableMemoryIntegerAmount of memory in bytes available to the current app (iOS only)No
batteryLevelIntegerRemaining battery level as an integer percentage of total battery capacityNo
batteryStateStringBattery state for the device. One of: "unplugged", "charging", "full".No
lowPowerModeBooleanA Boolean indicating whether Low Power Mode is enabled (iOS only)No
availableStorageIntegerBytes of storage remainingNo
totalStorageIntegerTotal size of storage in bytesNo
isPortraitBooleanA Boolean indicating whether the device orientation is portrait (either upright or upside down)No
resolutionStringScreen resolution in pixels. Arrives in the form of WIDTHxHEIGHT (e.g., 1200x900). Doesn't change when device orientation changesNo
scaleNumberScale factor used to convert logical coordinates to device coordinates of the screen (uses UIScreen.scale on iOS and DisplayMetrics.density on Android)No
languageStringSystem language currently used on the device (ISO 639)No
appSetIdStringAndroid vendor ID scoped to the set of apps published under the same Google Play developer account (see https://developer.android.com/training/articles/app-set-id)No
appSetIdScopeString (either "app" or "developer")Scope of the appSetId. Can be scoped to the app or to a developer account on an app store (all apps from the same developer on the same device will have the same ID)No

Identifier for Advertisers (IDFA/AAID)

The IDFA advertising identifiers are only added to the platform context if you fulfill the following requirements. Otherwise, their values will be NULL.

To track the IDFA identifier on iOS, you will need to initialize the tracker in native iOS (Swift or Objective-C) code. This is necessary because you will need to retrieve the ID from the ASIdentifierManager and pass it when creating the tracker in native code. Unfortunately, we can't provide this option in React Native since it would make the tracker library dependent on the API which would cause issues for apps that don't require it.

Please follow the documentation for the iOS tracker to call the Snowplow.createTracker() function inside the application(_:didFinishLaunchingWithOptions:) method. Make sure to pass the TrackerConfiguration.advertisingIdentifierRetriever callback that retrieves the ID as described here.