Application tracking
Setup summary
In order to track activities on your application, you'll need to keep in mind the following :
All user activities need to be sent to mediarithmics using the Tracking API
The Signature authentication should be used to authenticate any requests between your application and mediarithmics. Don't hesitate to contact your Account manager to have more information about this.
The activity and events in the payload need to comply with the specificities described below
The user agent identifier ($user_agent_id) needs to be particularly formatted using guidelines described here
Application integration options
The first option is to integrate a small piece of code (approx. 100 lines) into the application to execute calls to the mediarithmics tracking API. Sample code for iOS and Android is available in the Authentication section (see illustration below).

The second option is to re-use an already existing analytics tool. It is then possible to transfer events from the analytics solution's server to the mediarithmics API.

Predefined event names
In the context of app tracking, predefined event names are available out-of-the-box to simplify and automate event processing (full list of predefined event names):
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.
Mobile application tracking - UserActivity formatting
In the context of mobile app tracking, you should adapt some fields of the UserActivity. Here are the fields to look out for :
$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 identifier
$app_id
String
The mobile app id (previously created through Navigator / API)
CTV application tracking - UserActivity formatting
In the context of CTV app tracking, you should adapt some fields of the UserActivity. Here are the fields to look out for :
$type
String enum
The activity type should only be CTV_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 identifier.
$ctv_id
String
The ctv app id (previously created through Navigator / API)
For CTV application tracking, we allow automatic capture of IP addresses. Learn more
Last updated
Was this helpful?