Skip to content

Commit

Permalink
Merged the VerizonMedia ad component into the yahoo component
Browse files Browse the repository at this point in the history
  • Loading branch information
oath-jac committed Aug 25, 2021
1 parent 7b72de1 commit c5f0299
Show file tree
Hide file tree
Showing 2 changed files with 47 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');
}
}
38 changes: 38 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,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"}

0 comments on commit c5f0299

Please sign in to comment.