diff --git a/ads/vendors/yahoo.js b/ads/vendors/yahoo.js index 6cf3d361a7752..3ef287d28235f 100644 --- a/ads/vendors/yahoo.js +++ b/ads/vendors/yahoo.js @@ -5,7 +5,13 @@ import {validateData, writeScript} from '#3p/3p'; * @param {!Object} data */ export function yahoo(global, data) { - validateData(data, ['sid', 'site', 'sa']); - global.yadData = data; - writeScript(global, 'https://s.yimg.com/aaq/ampad/display.js'); + if (data.sid) { + validateData(data, ['sid', 'site', 'sa']); + global.yadData = data; + writeScript(global, 'https://s.yimg.com/aaq/ampad/display.js'); + } else if (data.config) { + validateData(data, ['config']); + global.jacData = data; + writeScript(global, 'https://jac.yahoosandbox.com/amp/jac.js'); + } } diff --git a/ads/vendors/yahoo.md b/ads/vendors/yahoo.md index 08dfe49f5c3b0..97eea2222b91c 100644 --- a/ads/vendors/yahoo.md +++ b/ads/vendors/yahoo.md @@ -14,6 +14,19 @@ ``` +```html + + +``` + ### Configuration For configuration details, please contact https://advertising.yahoo.com/contact. @@ -25,3 +38,27 @@ Supported parameters: - `data-sid` - `data-site` - `data-sa` +- `data-config` +- `data-stylesheet` + +### Required Parameters: + +`data-config` - Config for ad call JAC +`data-sa` - Config for ad call DARLA + +### Optional parameters: + +`data-stylesheet` - stylesheet to use inside iframe + +### Configuration Details + +For JAC ads : Required +"adServer":{"1AS":{region":"US"}}, +"positions":{"FB":{alias:"1111111"},"sizes":["300x250"]}}, +"site":{name:{"autoblogAMP"}},"spaceId":"111111"} + +Alias, Sizes, SiteName and spaceId should be replaced by correct values. +NOTE: SiteName should be site name + "AMP" + +Optional +"params":{"name":"value"}