Skip to main content

Activity data model

This is a JSON object with the following fields:

Name
Type
Description
Always present
accountIdStringThe ID of the account making the report of an action.Yes
deviceIdStringThe ID of the device from which the report action originated.No
idStringThe universally unique ID of the action.No
keyStringThe key of the action, for example, the contentId of a watch action.Yes
metadataMap [String,String]

A map of additional useful metadata, for example,

{"channel":"bbc one","programme":"eastenders"}.

No
nameStringThe category of the report action, for example, watch, recordActivity, or rate.No
timestampISO dateThe timestamp of the action. If none was provided, now() is used.No
userIdStringThe ID of the user that belongs to the given account, who is reporting the action.No
valueStringThe value of the action, for example, WATCH FULL or WATCH PARTIAL.Yes

Example

JS
{
    "id":"6fb9f0e0-967e-11e4-8196-f7b9520b3e0c",
    "accountId":"234521354",
    "userId":"",
    "deviceId":"abc345"
    "name":"rating",
    "key":"LYS24680",
    "value":"WATCH FULL",
    "timestamp":"2015-01-07T15:04:11Z",
    "metadata":{"Title":"Spinal Tap"}
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.