Redirect Notice

Redirect Notice

The page you requested has been relocated to Player Docs.

Using Yospace with AMP

This tutorial shows how to integrate Yospace ads with AMP.

This page covers:

  • Providing AMP with a configuration object for Yospace.
  • Providing AMP with the Yospace SDK and Yospace AMP plugin resource objects.

1. Providing AMP with a configuration object for Yospace

As a first step to include any of AMP plugins, it is needed to include a akamai.amp.PluginConfig for the desired plugin. In the case of Yospace is needed to include the yospace object (see akamai.amp.yospace.YospaceConfig) as part of the plugin configurations.

var config = {
  plugins: {
    yospace: {
      // Your Yospace configuration goes here
    }
  }
};
akamai.amp.AMP.create("amp", config);

2. Providing AMP with the Yospace SDK and Yospace AMP plugin resource objects

A akamai.amp.Resource must be included inside the Yospace configuration for both the Yospace SDK and the Yospace Plugin. If you have a custom version of the Yospace SDK you can use its url instead of the standard version by replacing the src.

var config = {
  plugins: {
    yospace: {
        debug: false,
        resources: [
          {src: "yo-ad-management.min.js", type: "text/javascript"},
          {src: "../akamai/amp/yospace/Yospace.js", type: "text/javascript"}
        ]
      }
    }
  }
};
akamai.amp.AMP.create("amp", config);