Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add new amp-ad type for verizonmedia (#32776)
* add verizonmedia ad type * Update ads/vendors/verizonmedia.md Co-authored-by: Alan Orozco <alanorozco@users.noreply.github.com> * Update verizonmedia.js updated copyright too * updates verizonmedia ad type as requested * Update verizonmedia.js suggested updates * add to ads.extern.js * prettify documentation * prettify documentation * prettify documentation * prettify documentation Co-authored-by: ed <ed.brandmark@verizonmedia.com> Co-authored-by: Alan Orozco <alanorozco@users.noreply.github.com>
- Loading branch information
1 parent
3aa6c2c
commit 13940cb
Showing
7 changed files
with
135 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright 2021 The AMP HTML Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS-IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// src/polyfills.js must be the first import. | ||
import '../polyfills'; | ||
|
||
import {draw3p, init} from '../integration-lib'; | ||
import {register} from '../3p'; | ||
|
||
import {verizonmedia} from '../../ads/vendors/verizonmedia'; | ||
|
||
init(window); | ||
register('verizonmedia', verizonmedia); | ||
|
||
window.draw3p = draw3p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright 2021 The AMP HTML Authors. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS-IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import {validateData, writeScript} from '../../3p/3p'; | ||
/** | ||
* @param {!Window} global | ||
* @param {{config: string}} data | ||
*/ | ||
export function verizonmedia(global, data) { | ||
validateData(data, ['config']); | ||
global.jacData = data; | ||
writeScript(global, 'https://jac.yahoosandbox.com/amp/jac.js'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!--- | ||
Copyright 2021 The AMP HTML Authors. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS-IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# VerizonMedia | ||
|
||
## Example | ||
|
||
```html | ||
<amp-ad | ||
type="verizonmedia" | ||
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 semantics of configuration, please see ad network documentation. | ||
|
||
### Required Parameters: | ||
|
||
`data-config` - Config for ad call | ||
|
||
### Optional parameters: | ||
|
||
`data-stylesheet` - stylesheet to use inside iframe | ||
|
||
### Configuration Details | ||
|
||
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"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters