Skip to content

Commit

Permalink
♻️ Verizon media yahoo components merge (#35797)
Browse files Browse the repository at this point in the history
* Merged the VerizonMedia ad component into the yahoo component

* Fixed documentation formatting issues.
  • Loading branch information
oath-jac authored Aug 26, 2021
1 parent 84ce446 commit f60679c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ads/vendors/yahoo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
37 changes: 37 additions & 0 deletions ads/vendors/yahoo.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
</amp-ad>
```

```html
<amp-ad
type="yahoo"
width="300"
height="250"
data-config='{"adServer":{"1AS":{"region":"US"}},
"positions":{"FB":{"alias":"1111111","sizes":["300x250"]}},
"site":{name:{"autoblogAMP"}},"spaceId":"111111"}'
data-stylesheet="https://www.autoblog.com/static/styles.css"
>
</amp-ad>
```

### Configuration

For configuration details, please contact https://advertising.yahoo.com/contact.
Expand All @@ -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"}

0 comments on commit f60679c

Please sign in to comment.