Adding Adverline to amp-ad (#5829) · 6StringCodes/amphtml@fe1b0c6 · GitHub
Skip to content

Commit fe1b0c6

Browse files
benjaminclotlannka
authored andcommitted
Adding Adverline to amp-ad (ampproject#5829)
* + Adverline amp-ads adapter Signed-off-by: Benjamin Clot <benjamin.clot@gmail.com> * fixed indentation * no need to preconnect if the URL is in prefetch
1 parent aa61de3 commit fe1b0c6

6 files changed

Lines changed: 92 additions & 4 deletions

File tree

3p/integration.js

Lines changed: 2 additions & 0 deletions

ads/_config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ export const adConfig = {
9898
prefetch: 'https://s.d.adup-tech.com/jsapi',
9999
},
100100

101+
adverline: {
102+
prefetch: 'https://ads.adverline.com/richmedias/amp.js',
103+
preconnect: [
104+
'https://adnext.fr',
105+
],
106+
renderStartImplemented: true,
107+
},
108+
101109
advertserve: {
102110
renderStartImplemented: true,
103111
},

ads/adverline.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS-IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import {validateData, writeScript} from '../3p/3p';
18+
19+
/**
20+
* @param {!Window} global
21+
* @param {!Object} data
22+
*/
23+
export function adverline(global, data) {
24+
validateData(data, ['id', 'plc'], ['s', 'section']);
25+
26+
writeScript(global, 'https://ads.adverline.com/richmedias/amp.js');
27+
}

ads/adverline.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!---
2+
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS-IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
# Adverline
18+
19+
## Examples
20+
21+
### Single ad
22+
23+
```html
24+
<amp-ad width=300 height=250
25+
type="adverline"
26+
data-id="your_publisher_id"
27+
data-plc="your_plc"
28+
data-section="your,test,sections" >
29+
</amp-ad>
30+
```
31+
32+
## Configuration
33+
34+
Required parameters:
35+
- id: site ID
36+
- plc: format ID (unique per page)
37+
38+
Additional parameters:
39+
- section: tag list, separated by commas
40+
- s: dynamic sizing, allowed values: fixed, all, small (default), big

examples/ads.amp.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ <h2>Ad networks in <span class="broken">red color</span> have broken examples, p
9090
<a href="#adstir">AdStir</a> |
9191
<a href="#adtech">AdTech</a> |
9292
<a href="#aduptech">Ad Up Technology</a> |
93+
<a href="#adverline">Adverline</a> |
9394
<a href="#advertserve">AdvertServe</a> |
9495
<a href="#affiliateb">Affiliate-B</a> |
9596
<a href="#amoad">AMoAd</a> |
@@ -288,12 +289,21 @@ <h2 id="aduptech">Ad Up Technology</h2>
288289
<div fallback></div>
289290
</amp-ad>
290291

292+
<h2 id="adverline">Adverline</h2>
293+
<amp-ad width=300 height=250
294+
type="adverline"
295+
data-id=13625
296+
data-plc=3>
297+
<div placeholder></div>
298+
<div fallback></div>
299+
</amp-ad>
300+
291301
<h2 id="advertserve">AdvertServe</h2>
292302
<amp-ad width=300 height=250
293-
type="advertserve"
294-
data-client="tester"
295-
data-pid=0
296-
data-zid=68>
303+
type="advertserve"
304+
data-client="tester"
305+
data-pid=0
306+
data-zid=68>
297307
<div placeholder></div>
298308
<div fallback></div>
299309
</amp-ad>

extensions/amp-ad/amp-ad.md

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)