From 1a55023097c1038f760de54baf3f9a6329baca7c Mon Sep 17 00:00:00 2001 From: oath-jac Date: Wed, 25 Aug 2021 15:34:59 +0300 Subject: [PATCH 1/2] Merged the VerizonMedia ad component into the yahoo component --- ads/vendors/yahoo.js | 12 +++++++++--- ads/vendors/yahoo.md | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/ads/vendors/yahoo.js b/ads/vendors/yahoo.js index 6cf3d361a775..3ef287d28235 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 08dfe49f5c3b..4258a4be0a0c 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,28 @@ 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"} From fb9ca22e73004551d9b2f3535b783ad414f0047a Mon Sep 17 00:00:00 2001 From: oath-jac Date: Wed, 25 Aug 2021 16:25:21 +0300 Subject: [PATCH 2/2] Fixed documentation formatting issues. --- ads/vendors/yahoo.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ads/vendors/yahoo.md b/ads/vendors/yahoo.md index 4258a4be0a0c..97eea2222b91 100644 --- a/ads/vendors/yahoo.md +++ b/ads/vendors/yahoo.md @@ -41,11 +41,10 @@ Supported parameters: - `data-config` - `data-stylesheet` - ### Required Parameters: `data-config` - Config for ad call JAC -`data-sa` - Config for ad call DARLA +`data-sa` - Config for ad call DARLA ### Optional parameters: