-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yahoo amp-ad plugin #5122
Yahoo amp-ad plugin #5122
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright 2016 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, loadScript} from '../3p/3p'; | ||
|
||
/** | ||
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function yahoo(global, data) { | ||
validateData(data, ['sid', 'site', 'sa']); | ||
loadScript(global, 'https://s.yimg.com/os/ampad/display.js', function () { | ||
window.ampAdExecute(global, data); | ||
}); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!--- | ||
Copyright 2016 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. | ||
--> | ||
|
||
# yahoo | ||
|
||
## Display | ||
|
||
```html | ||
<amp-ad | ||
type="yahoo" | ||
width="316" | ||
height="264" | ||
data-sid="954014446" | ||
data-site="news" | ||
data-sa='{"LREC":"300x250","secure":"true","content":"no_expandable;"}'> | ||
</amp-ad> | ||
``` | ||
|
||
### Configuration | ||
|
||
For configuration details, please contact https://advertising.yahoo.com/contact | ||
|
||
Supported parameters: | ||
|
||
- height | ||
- width | ||
- data-sid | ||
- data-site | ||
- data-sa |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,7 @@ <h2>Ad networks in <span class="broken">red color</span> have broken examples, p | |
<a href="#webediads">Webediads</a> | | ||
<a href="#weborama">Weborama</a> | | ||
<a href="#widespace">Widespace</a> | | ||
<a href="#yahoo">Yahoo</a> | | ||
<a href="#yahoojp">YahooJP</a> | | ||
<a href="#yieldbot">Yieldbot</a> | | ||
<a href="#yieldone">Yield One</a> | | ||
|
@@ -926,6 +927,16 @@ <h2>Widespace 300x300 no-ad fallback</h2> | |
<div fallback></div> | ||
</amp-ad> | ||
|
||
<h2 id="yahoo">Yahoo Display</h2> | ||
<amp-ad width="316" height="264" | ||
type="yahoo" | ||
data-sid="954014446" | ||
data-site="news" | ||
data-sa='{"LREC":"300x250","secure":"true","content":"no_expandable;"}'> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please also add the following tags inside
|
||
<div placeholder></div> | ||
<div fallback></div> | ||
</amp-ad> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also add an example for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
<h2 id="yahoojp">YahooJP YDN</h2> | ||
<amp-ad width="300" height="250" | ||
type="yahoojp" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls move the JS doc to the right place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went ahead and restructured this code a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done