Reporting activity and event metrics to UAV
Overview
To enable the wide range of reports that OPF delivers out-of-the-box and to empower operators to create their own reports, the client must send certain data to the OPF platform for processing and storage.
The reported data is used to generate analytics reports that are available through TV Analytics.
The reported data is not available for querying by the client application.
You should follow the guidance below to report the relevant activities and to structure and provide the right data for those activities.
Any value within the metadata section can be left blank, but you need to understand that this data will not be available for processing or reporting. In addition, the client can add additional values in the metadata section in the key-value pair format as required – these additional values will be stored and available for custom reporting.
Prior to release 21.38, clients were required to report such activity and metrics separately so the recommendation engine used could provide personalised recommendations.
Since release 21.38, clients can report activity and metrics as described below and they will be passed on to the recommendation engine automatically without the client having to report them separately.
Request
To report metrics, make the following POST request:
http://<host>:<port>/useractivityvault/v1/useractivity/{activityName}
where activityName
is the name of the activity you are reporting. You can use any name that you want, but the following are activity names that Platform understands and associates with regular (non-custom) reports:
privacyPolicy
appStart
appEnd
playbackStart
playbackStop
playbackPause
playbackSkipAhead
playbackSkipBack
adWatched
adDeliverd
adSkipped
playbackHeartbeat
scheduleRecording
watch
playback_metrics
playerError
thirdPartyAppStart
returnToLauncher
deepLinkTriggered
downloadTriggered
railView
railSelection
These are explained in more detail in the (22.24_Q2) Reporting activity and event metrics to UAV#Activities section below.
This API allows the client to report any activity or action that the operator feels is important or of value for capture. The documented activities below are the suggested actions for capture.
Headers
Content-Type: application/json
- Authorisation
Mandatory arguments
accountID
userId
– must be set to""
(empty string)deviceId
key
– must be set to""
(empty string)
The following arguments are not strictly mandatory (that is, omitting them will not cause the request to fail), but are required for full and correct reporting. They are all specified as key/value pairs in the metadata
block:
appSessionId
– theappSessionId
is used to indicate a period of time wherein a user interacts with the app. Usually triggered by the opening of an app, a session records the length and frequency of app use to show developers, marketers and product managers how much time users spend within an app. An app session id should be generated/starts when a user opens an application and ends when they exit it.playbackSessionId
– playback session ID, this session is specific to the playout of content, each time the content being played out is changed a new session ID should be generated and used when reporting playout session actions.editorialID
– the ID of the editorial, which provides a unique content reference,contentSource
– one of the following:IPTV
– TV content is delivered over an IP network (not the open Internet)OTT
– TV content is deliver over-the-top (OTT), that is, via the InternetBlend
– a mixture of IPTV and OTT
contentType
– indicates the type of content being consumed: see the table below for expected values.Description of Possible Content Types
Corresponding Content-Type Value to use VOD content
vod-ed
An event recorded through NPVR
npvr-event
A live event
live-event
An short-term catchup event live-stcu-event
A start-over event start-over
Download-to-go (D2G) content
Note: any content that is being played back from local storage is considered D2G.
D2G
Note on metadata
Clients are free to report any additional metadata in the standard key-value pair format. Any metadata that does not map directly to the definitions in the activitytable below will still be stored in the Data Warehouse and be available for custom reporting.
It will be stored in a generic metadata table that can be joined via the activity ID. This allows the client to report any new data or additional data as required without having to make any changes to the Data Warehouse schema.
Recommendations
In addition to being used for analytics and reporting, activities reported via this interface will also be used to drive recommendations via the partner recommendations engine. This requires specific data to be included in the activity object. For existing integrations, this data is already being supplied within the CDG call, but if the client is updated to include the following activities then the additional calls to CDG can be removed as they will no longer be required.
The following table shows the default scoring (weighting) that OPF applies to each activity that is related to recommendations. For example, by default, a playbackStart
event generates a message to the recommendation engine with a positive score of 0.7. The recommendation engine uses these scores to generate more accurate recommendations for users based on past activities.
Activities used for recommendations | Default scoring (from -1 (worst) to 1 (best)) | Required data | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
playbackStart | 0.7 | One of the following, dependent on the content type being watched:
| ||||||||
scheduleRecording | 0.7 | Program ID | ||||||||
| 1 | One of the following, dependent on the content type being watched:
| ||||||||
deepLinkTriggered | 0.5 | Deep link ID | ||||||||
| 0.7 | Technical ID |
Activities
We recommend your client app report the following types of activity with the aim of providing at least the listed metadata. In some cases not all of the metadata will be available.
Category | Activity name | Trigger | Description | Message metadata keys | Notes | Examples |
---|---|---|---|---|---|---|
Privacy | ||||||
privacyPolicy | User consent or non-consent | Allows the client to capture the user's consent and related information in relation to any local or global policy. | deviceId | The US privacy string (
| POST https://<server>/useractivityvault/v1/useractivity/privacyPolicy | |
Standard | ||||||
appStart | Client session creation | When app starts up | appSessionId |
In mobile, a session begins when the app is opened (in the foreground) and ends when it goes into the background and no events occur within a predetermined time window, dependent on the measurement provider. Note that because of the typical multitasking nature of mobile users, events that occur within the predetermined window count towards the current session. | POST https://<server>/useractivityvault/v1/useractivity/appStart | |
appEnd | Client session tear down | When app is shut down or times out due to inactivity | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/appEnd | ||
playbackStart | Start of playback | appSessionId | Zero position event The
| POST https://<server>/useractivityvault/v1/useractivity/playbackStart "accountId": "60ab88ccb780b5233dfec9cd", } | ||
playbackStop | User stops playback either with stop action or browsing away from playout | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/playbackStop { | |||
playbackPause | User pauses playout | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/playbackPause | |||
| Fast forward or drag timeline forward | Covering fast forward or skip, allowing the tracking of the start point and the endpoint when playback resumes | appSessionId |
| POST https://<server>/useractivityvault/v1/useractivity/playbackSkipAhead | |
playbackSkipBack | Rewind or drag timeline backward | Covering rewind or skip back, allowing the tracking of the start point and the endpoint when playback resumes | appSessionId |
| POST https://<server>/useractivityvault/v1/useractivity/playbackSkipBack | |
adWatched | Completion of viewing a delivered advert | For ad tracking, allows the client to capture data on the adverts watched by the user | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/adWatched | ||
adDelivered | Ad delivered in a stream | Capture adverts that are delivered, useful for reference if the user skips the ad | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/adDeliverd | ||
adSkipped | Skipping adverts where allowed. | Capture the action of skipping an ad where allowed. | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/adSkipped | ||
scheduleRecording | User triggers a recording to be created on OPF | appSessionId | Platform could provide this with a small impact. | POST https://<server>/useractivityvault/v1/useractivity/scheduleRecording | ||
playbackHeartbeat | Created regularly to indicate that the user is watching a stream of content without interacting with the client. we recommend recording this activity every 60 seconds. | Heartbeat/playout time Used to track playout at a granular level. This data is not recorded for operational use only used for reporting. | appSessionId | If the player metrics are reported regularly with a matching session ID, we can use those for the streaming indicator. | POST https://<server>/useractivityvault/v1/useractivity/playbackHeartbeat | |
watch | Created when the user clicks the play option on content | Current activity that is reported on first playback | appSessionId | Keep for backward compatibility. | POST https://<server>/useractivityvault/v1/useractivity/watch | |
QOE/QOS | ||||||
Playback_Metrics | To be reported back at a consistent interval, this can be configured by clients. we recommend recording this activity every 60 seconds. | Metrics as supplied by the player and reported back via the client. | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/playback_metrics { | ||
playerError | Log client side errors as required | Where required, useful to capture basic error information that relates to the user experience | appSessionId | Not to be used for logging or debugging. Use sparingly where the error will have impacted the user and would provide value for reporting. | POST https://<server>/useractivityvault/v1/useractivity/playerError | |
App Actions | ||||||
thirdPartyAppStart | To be created when a third-party application is triggered/opened on the launcher | Capture the act of starting a third-party application due to a deep link or the client acting as a launcher (Netflix, Prime, etc.). | appSessionId | Deep link provider is the provider of the deep-linked content (e.g., Disney, Prime, etc .). | POST https://<server>/useractivityvault/v1/useractivity/thirdPartyAppStart | |
returnToLauncher | To be created when the launcher becomes the active app | Launcher becomes active | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/returnToLauncher | ||
deepLinkTriggered | To be created when a deep linked asset is selected via the client | Clicking through to watch content from a Rail or other client source on a deep link provider | appSessionId | Provider ID is the content ID as provided in the deep link data. Deep link provider is the provider of the deep-linked content (Disney, Prime, etc.). | POST https://<server>/useractivityvault/v1/useractivity/deepLinkTriggered | |
downloadTriggered | To be created when content is downloaded for watching off line, aka D2G. | Download to go Capture the action when a user triggers the download of content | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/downloadTriggered | ||
Rails-specific | ||||||
railView | Created when the Rail is shown on the screen (user engagement measure) | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/railView | |||
railSelection | Created when a user selects a Rail item to open the media card/more detail | appSessionId | POST https://<server>/useractivityvault/v1/useractivity/railSelection |