Mobile apps tracking
In mobile apps, use our Tracking API to register user activities.
By design, mobile apps are subject to Man-in-the-Middle attacks and could be decompiled by end users. Hence, we don’t recommend to use an API Token authentication or a login / password approach as they would be easily retrieved by malicious people.
The Signature authentication should be used instead.

Predefined event names

In the context of Mobile App Tracking, predefined event names simplify and automate event processing:
  • app open event ($app_open) corresponds to the opening of the app and app resume event (when the app becomes active again)
  • app install event ($app_install)
  • app update event ($app_update)
The install and update events are automatically calculated on server side and you don't have to send them :
  • The install event ($app_install) is triggered the first time an app open event is received for a user, regardless if the user is new or existing.
  • The update event ($app_update) is triggered when the SDK version, app version or OS version changes from one open to the next.

User activities for mobile apps

In the context of Mobile App Tracking, some fields of the User Activity objects have a limited set of possible values. Details below:
Field
Type
Description
$type
String enum
The activity type should only be APP_VISIT
$session_status
String enum
The sessions status should be: IN_SESSION: This value should be used if you’re making one API call per tracked event (recommended way). The platform will automatically aggregate all the events of a session sent through many API calls when this value is used. CLOSED_SESSION: should be used only if you do a single API call per session at its end. In this case, you should provide ALL the events of the session in the $events array in the call. Each API call with this value will generate a new User Activity in the Platform.
$user_agent_id
String (Optional)
The user agent identifier of the user device containing a unified representation of an advertising id. Ex: mob:ios:raw:6d92078a-8246-4ba4-ae5b-76104861e7dc for a raw IDFA on iOS platform.
$app_id
String
The mobile app id (previously created through Navigator / API)