Media Collection API

The Streaming Media Collection API is a server-side, RESTful equivalent of the client-side Media SDK for tracking streaming audio and video in Adobe Analytics. It composes a media session on Adobe's servers from a sessions call followed by a series of events calls, which are aggregated into the same media metrics that the Media SDK produces. This page introduces the Media Collection API and its two endpoints.

data-variant=info
data-slots=text
For new streaming media implementations, Adobe recommends the Media Edge API on the Adobe Experience Platform Edge Network. This documentation covers the Analytics-specific Media Collection API, which remains fully supported for existing and server-side implementations (much as AppMeasurement remains supported alongside the newer Web SDK).

How it relates to the Media SDK

A media player that implements the Media Collection API makes RESTful tracking calls directly to Adobe's media collection endpoint, whereas a player that implements the Media SDK makes calls to SDK methods inside the player app. Because the calls travel over the network, a Media Collection API implementation handles some of the processing (such as session management, pinging, and event ordering) that the Media SDK performs automatically. The tracking data is collected and initially processed differently for the two approaches, but the same back-end processing engine aggregates both into Analytics.

The client Media SDKs (for example, the JavaScript 3.x and Chromecast SDKs) call this same REST API under the hood, so the Media Collection API is the direct, language-independent way to send the same data from any server or platform.

Choosing a collection method

The Media Collection API is one of several Adobe Analytics data collection methods. Use it when you need server-side, SDK-free streaming media tracking. For a comparison of all the collection methods, see the collection method comparison.

Authentication

The Media Collection API does not use an authorization token. Data is routed and attributed by the Analytics parameters you send in each session: the report suite (analytics.reportSuite), tracking server (analytics.trackingServer), and Experience Cloud organization ID (visitor.marketingCloudOrgId). For how this compares to the other collection methods, see the collection method comparison.

Media tracking data flows

A media player implementing the Media Collection API makes tracking calls to the media collection endpoint over HTTP. The endpoint is a provisioned host of the form https://{uri}; obtain your {uri} from your Adobe representative. Every call is an HTTP POST with a JSON request body, and every call sets the Content-Type: application/json request header.

Media tracking data flow from a player through the Media Collection API to Adobe Analytics reporting.

API overview

The Media Collection API has two endpoints.

For the complete machine-readable specification of both endpoints, see the Media Collection API reference.

Request body

Both endpoints accept a JSON body with the same structure:

{
    "playerTime": {
        "playhead": "{playhead position in seconds}",
        "ts": "{timestamp in milliseconds}"
    },
    "eventType": "{event-type}",
    "params": {
        "{parameter-name}": "{parameter-value}"
    },
    "qoeData": {
        "{parameter-name}": "{parameter-value}"
    },
    "customMetadata": {
        "{parameter-name}": "{parameter-value}"
    }
}

Event types

The eventType member accepts the following values:

sessionStart, sessionComplete, sessionEnd, adBreakStart, adBreakComplete, adStart, adComplete, adSkip, chapterStart, chapterComplete, chapterSkip, play, ping, bufferStart, pauseStart, bitrateChange, error, stateStart, and stateEnd.

For details on when to send each event, see Events endpoint.

Next steps