Adobe Media Analytics (3.x SDK) for Audio and Video extension overview
Use this documentation for information on installing, configuring, and implementing the Adobe Media Analytics (3.x SDK) for Audio and Video extension (Media Analytics extension). Included are the options available when using this extension to build a rule, along with examples and links to samples.
The Media Analytics (MA) extension adds the core JavaScript Media SDK (Media 3.x SDK). This extension provides the functionality for adding the Media
tracker instance to a tags-enabled site or project. The MA extension requires two additional extensions:
After you have included all three of the extensions mentioned above in your tags-enabled project, you can proceed in one of two ways:
- Use
Media
APIs from your web app - Include, or build, a player-specific extension that maps specific media player events to the APIs on the
Media
tracker instance. This instance is exposed through the MA extension.
Install and configure the MA extension
-
Install: To install the MA extension, open your extension property, select Extensions > Catalog, hover over the Adobe Media Analytics (3.x SDK) for Audio and Video extension, and select Install.
-
Configure: To configure the MA extension, open the Extensions tab, hover over the extension, and then select Configure:
Configuration options:
window
objectReminder: The MA extension requires the Analytics and Experience Cloud ID extensions. You must also add these extensions to your extension property and configure them.
Using the MA extension
Using from a webpage/JS-app
The MA extension exports the Media APIs in the global window object by enabling the “Export APIs to Window Object” setting in the Configuration page. It exports the APIs under the configured variable name. For example, if the variable name is configured to be ADB
, then Media APIs can be accessed by window.ADB.Media
.
window["CONFIGURED_VARIABLE_NAME"]
is undefined and does not override existing variables.-
Media APIs:
window["CONFIGURED_VARIABLE_NAME"].Media
This exposes all the APIs and constants from Media SDK: https://adobe-marketing-cloud.github.io/media-sdks/reference/javascript_3x/APIReference.html
-
Create Media Tracker Instance:
window["CONFIGURED_VARIABLE_NAME"].Media.getInstance
Return Value: A
Media
tracker instance for tracking a media session.code language-javascript var Media = window["CONFIGURED_VARIABLE_NAME"].Media; var tracker = Media.getInstance();
-
Using the Media tracker instance, follow the JS API documentation to implement media tracking.
You can obtain the sample player here: MA Sample Player. The sample player acts as a reference to showcase how to use the MA extension to support Media Analytics directly from a webapp.
Using from other extensions
The MA extension exposes media
as a shared module to other extensions. (For additional information on Shared Modules, see Shared Modules documentation.)
turbine
(see code sample below) outside of an extension.-
Media APIs:
media
Shared ModuleThis exposes all the APIs and constants from Media SDK: https://adobe-marketing-cloud.github.io/media-sdks/reference/javascript_3x/APIReference.html
-
Create the Media tracker instance as follows:
Return Value: A
Media
tracker instance for tracking a media session.code language-javascript var Media = turbine.getSharedModule('adobe-media-analytics', 'media'); var tracker = Media.getInstance();
-
Using the Media tracker instance, follow the JS API documentation to implement media tracking.