Akamai Media Analytics

Akamai Media Analytics plugin is deprecated and will be removed in the next release. See how to disable Media Analytics from AMP.

This tutorial will show you how to properly implement Akamai Media Analytics using the AMPlayer Media Analytics Plugin.

To check the final result, visit our demo page, under the "Measurement" section.

Steps:

var mediaanalytics = { }

Include the Player Resource objects array required to load the MA Library and Plugin. These values don’t change.

var mediaanalytics = {
  resources: [
    {src: "//79423.analytics.edgekey.net/ma_library/javascript/javascript_malibrary.js", type: "text/javascript", async: true},
    {src: "#{paths.plugins}mediaanalytics/Mediaanalytics.min.js", debug: "#{paths.plugins}mediaanalytics/Mediaanalytics.js", type: "text/javascript", async: true}
  ]
}

Include the url to the MA library configuration xml:

var mediaanalytics = {
  resources: [
    {src: "//79423.analytics.edgekey.net/ma_library/javascript/javascript_malibrary.js", type: "text/javascript", async: true},
    {src: "#{paths.plugins}mediaanalytics/Mediaanalytics.min.js", debug: "#{paths.plugins}mediaanalytics/Mediaanalytics.js", type: "text/javascript", async: true}
  ],
  config: "//ma188-r.analytics.edgesuite.net/config/beacon-2114.xml"
}

To enable/disable the IP look up, include "iplookup: true/false"

var mediaanalytics = {
  resources: [
    {src: "//79423.analytics.edgekey.net/ma_library/javascript/javascript_malibrary.js", type: "text/javascript", async: true},
    {src: "#{paths.plugins}mediaanalytics/Mediaanalytics.min.js", debug: "#{paths.plugins}mediaanalytics/Mediaanalytics.js", type: "text/javascript", async: true}
  ],
  config: "//ma188-r.analytics.edgesuite.net/config/beacon-2114.xml",
  iplookup: false
}

A key-value object dimensions should be included to track any desired dimension. Here is a list with the currently available MA dimensions.

var mediaanalytics = {
  resources: [
    {src: "//79423.analytics.edgekey.net/ma_library/javascript/javascript_malibrary.js", type: "text/javascript", async: true},
    {src: "#{paths.plugins}mediaanalytics/Mediaanalytics.min.js", debug: "#{paths.plugins}mediaanalytics/Mediaanalytics.js", type: "text/javascript", async: true}
  ],
  config: "//ma188-r.analytics.edgesuite.net/config/beacon-2114.xml",
  iplookup: false,
  dimensions: {
    title: "AMP Sample Title",
    playerId: "Sample Player Id"
  }
}

If you have any custom dimension configured in your report pack you can use that one the same way, by adding a key for your custom dimension and its value. As an example, imagine we have configured the custom dimension “eventName” in our report pack, to report the current event being broadcasted. Here is how our dimensions object will look:

Once you have properly configured your Media Analytics Config object add it to the plugins sections in your configuration object. Notice that the plugin name is "mediaanalytics".

Last modified: 16/7/2023, AMP Support.