Mobile App event specificity

A full event is the addition of event specific information and data gathered by the SDK. For each event you'll find in the documentation "events reference" all the possible properties and the mandatory ones.

Event SDK mapping

To create event, you will need to use classes from the SDK which represents the events. As this might be confusing, you'll find here a list of class name and their event counterparts.

All those class names are valid on both Android and iOS.

Event specificity for mobile app

IOS and Android SDK add specific properties regarding the device and app. Those are in addition to event managed properties.

If you track your mobile applications without using the sdk (with the http tracking api), you should follow this specification to benefit from plug&play on destinations\

Here are an example of event playload :

{
   "event_name":"add_to_cart",
   "value":22.53,
   "currency":"EUR",
   "user": {
	   "consistent_anonymous_id": "b5c6aa4e-0532-40c0-bf6b-a77bff46d600",
	   "email": "toto@domain.fr",
	   "consent_categories": ["1", "3"]
   },
   "items":[
      {
         "id":"SKU_12345",
         "quantity":1,
         "product":{
            "id":"12345",
            "name":"Trex tshirt",
            "price":9.99
         }
      }
   ],
   "context":{
      "event_id":"8f6e05dd-6df0-476c-9c56-5d277fac7cea",
      "device":{
         "sdk_id":"a47f71c0-9561-4a26-96d6-0d8632095caa",
         "user_agent":"Mozilla\/5.0 (Linux; Android 13; sdk_gphone64_arm64 Build\/TE1A.220922.012; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/103.0.5060.71 Mobile Safari\/537.36",
         "manufacturer":"Google",
         "model":"sdk_gphone64_arm64",
         "name":"emu64a",
         "type":"android",
         "language":"en",
         "region":"US",
         "network":{
            "bluetooth":false,
            "cellular":false,
            "wifi":true
         },
         "os":{
            "name":"android",
            "version":"13"
         },
         "screen":{
            "width":1080,
            "height":1857,
            "density":2.625
         },
         "timezone":"Europe\/Paris",
         "lifecycle":{
            "session_id":"5ab5fd16-5ebd-42bb-8c9c-b12564370c83",
            "new_session":false,
            "first_execute":false,
            "is_first_visit":true,
            "session_duration":138200,
            "current_session":1673571497826,
            "current_visit":1673571497826,
            "current_version_first_visit":1673571497826,
            "first_visit":1673571497826,
            "last_visit":1673571497826,
            "last_call":1673571632270,
            "last_session_start":0,
            "last_session_last_hit":0,
            "foreground_time":137652,
            "background_time":548,
            "foreground_transitions":2,
            "session_number":1,
            "visit_number":1
         }
      },
      "app":{
         "name":"TCDemo ServerSide And Consent",
         "version":"1.0",
         "build":"1",
         "namespace":"com.tagcommander.tcdemo",
         "core_version":"5.3.1",
	 "consent_version":"5.4.2",
         "serverside_version":"5.3.1"
      },
      "event_timestamp":1673571636026
   }
}

Fields details

Here are fields automatically added by the sdk.

(*) IP Address is not collected by our libraries, but instead filled in by our servers when it receives a message for client side events only.

context

context.app

context.device

The next fields require consent and are added when you call "addAdvertisingIDs" from the ServerSide class.

user

User contains all fields declared inside https://doc.commandersact.com/developers/tracking/events-reference/common-events#user

context.device.os

context.device.screen

context.device.network

context.device.lifecycle

Last updated