Getting Started - Core
Core Content Block is the necessary content block for dealing with basic building blocks of your application. Core content block provides the core functionality for the Causal Foundry SDK in order to set up the SDK and also helps with the nudge listening mechanism.
Core content block mainly focus on events related to app navigation of your application, such as events related to app -> app opening, app closing or moving to background. Also for the screen related events, how much time a user spends on a screen and also some basic functional events as well such as login, media related or search related events.
To use the SDK, Core is mandatory to include as it contains the elements regarding the basic app navigation and workflow including nudges. Moreover, all the modules require the core to be integrated to successfully log the events.
To initialise the core SDK, you can jump over to Getting Started Section
As per the SDK structure, content blocks are further divided into 2 main categories: Ingest Events and Catalog Events.
- Ingest Events helps with time sensitive elements such as when an event is happening.
- Catalog Events helps with static content that provide details about the elements in the events.
To get into more details, You can view both Ingest events and Catalog Events for Core Module.
Main Log Format
CF SDK automatically starts tracking user data (e.g., Upload/download speed, OS version, device IDs) and engagement with the basic setup above. This data can be stored on the device and uploaded in batches to reduce network and power usage, and to increase the likelihood of successful uploads while you can also upload the events as soon as they happen. The upload is done when the user device session ends. SDK also starts tracking user sessions with this basic setup.
This enables you to gain in-depth insights into user interactions across partner's app. You can also leverage this data to segment users, personalize messages and configure campaign targeting.
We have several predefined actions that users can perform while interacting with partner's app. These actions are referred to as System Events that help in tracking elements on partner's app with user interaction. Some of these events are automated so that partner's don’t have to spend time integrating them.
Below is the Main Body Log Format and its sections that are dependent on it.
Main Log Body Format:
Param | Usability | Format | Description |
---|---|---|---|
s_id: | REQUIRED | STRING <u_id>_startTimeInMillis_endTimeInMillis) |
a unique id for each session, autogenerated by SDK. endTimeInMillis will be 0 for immediate events |
u_id: | REQUIRED | STRING | a unique id for a user, provided by the partner. |
d_info | REQUIRED | OBJECT | Information about user device e.g. brand, device id, model, OS and OS version. |
app_info | REQUIRED | OBJECT | Information about the app being used e.g. app id, version name and number and min amd target sdk version. (lowest and highest OS version app is available on). |
sdk | REQUIRED | STRING <os_name>_<sdk_version> |
version of sdk in use, auto-provided by the SDK. |
up | REQUIRED | INTEGER | Upload speed in Kbps for the user at the time of API request. |
dn | REQUIRED | INTEGER | Download speed in Kbps for the user at the time of API request. |
data | REQUIRED | ARRAY | Contains the logs that happened in the session, more details follow. |
Device Info Object Format:
Param | Usability | Format | Description |
---|---|---|---|
brand | REQUIRED | STRING | Manufacturer of the phone being used, auto-provided by SDK. |
id | REQUIRED | STRING | Unique Id for the device being used, auto-provided by SDK. |
model | REQUIRED | STRING | Make/Model of the phone being used, auto-provided by SDK. |
os | REQUIRED | STRING | OS name of the phone being used, auto-provided by SDK. |
os_ver | REQUIRED | STRING | OS version of the phone being used, auto-provided by SDK. |
App Info Object Format:
Param | Usability | Format | Description |
---|---|---|---|
id | REQUIRED | STRING | Unique id for the app using which the app is released on the play stores/website url. |
min_sdk_version | REQUIRED | INTEGER | Minimum OS version the app is supported on. |
target_sdk_version | REQUIRED | INTEGER | Highest OS version the app is supported on, although PlayStore can allows users above this version to use the app. |
version_code | REQUIRED | INTEGER | Version code for the app, unique for every release made to PlayStore. |
version_name | REQUIRED | STRING | Version name for the app, details as : <major_version>.<minor_version>.<patch_version> |
version | REQUIRED | STRING | Complete version name for the app : <major_version>.<minor_version>.<patch_version> (<version_code>) |
Data Object Format:
Param | Usability | Enum | Format | Description |
---|---|---|---|---|
block | REQUIRED | core, e_learning, e_commerce, payment, loyalty, patient_mgmt | STRING | content block name for the events logged. |
ol | REQUIRED | -- | BOOLEAN | Connectivity status about the Phone while the event was triggered, auto-provided by SDK. |
ts | REQUIRED | -- | STRING (ISO 8601 format) |
timestamp (including milliseconds) with timezone when event is triggered, auto-provided by SDK. |
type | REQUIRED | Event Name | STRING | type of log/event being triggered. |
props | REQUIRED | -- | OBJECT | A free format JSON schema depending on the value of type |
Schema Overview of the Whole Object
{
"s_id": "user123_1674728022000_1674728030000",
"u_id": "user123",
"app_info": {
"id": "ai.causalfoundry.android.sdk",
"min_sdk_version": 21,
"target_sdk_version": 31,
"version": "0.0.8 (1)",
"version_code": 1,
"version_name": "0.0.8"
},
"d_info": {
"brand": "google",
"id": "91aebf68ce6140dc",
"model": "pixel 6",
"os": "Android",
"os_ver": "31"
},
"dn": 4300,
"sdk": "android/0.0.1",
"up": 1800,
"data": [
{
"block": "core",
"props": {
"action": "open"
},
"type": "app",
"ol": true,
"ts": "2023-01-26T12:13:44.221+01:00"
},
{
"block": "core",
"props": {
"duration": 3.9,
"path": "ai.causalfoundry.android.sdk",
"title": "MainActivity"
},
"type": "page",
"ol": true,
"ts": "2023-01-26T12:13:48.106+01:00"
},
{
"block": "core",
"props": {
"action": "background"
},
"type": "app",
"ol": true,
"ts": "2023-01-26T12:13:49.858+01:00"
}
]
}