Skip to content

Commit

Permalink
Adding new vendor IncrementX (ampproject#39237)
Browse files Browse the repository at this point in the history
* Add files via upload

* Add files via upload

* Add files via upload

* Update integration.js

* Update _config.js

* Update ads.amp.html

* Update ads.amp.html

* Update ads.amp.esm.html

* Update amp-ad.md

* Update ads.html

* Update ads.out

* Update integration.js

removed the lines of incrementx

* Update ads.out

removed incrementx lines

* Update ads.amp.esm.html

removed whitespaces on both the lines

* Update incrementx.js
  • Loading branch information
Prebid-Vertoz authored Jul 25, 2023
1 parent 7a17f37 commit 2b25653
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 3p/vendors/incrementx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// src/polyfills.js must be the first import.
import '#3p/polyfills';

import {register} from '#3p/3p';
import {draw3p, init} from '#3p/integration-lib';

import {incrementx} from '#ads/vendors/incrementx';

init(window);
register('incrementx', incrementx);

window.draw3p = draw3p;
5 changes: 5 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,11 @@ const adConfig = jsonConfiguration({
},
'improvedigital': {},

'incrementx': {
prefetch: 'https://cdn.incrementxserv.com/ixamp.js',
renderStartImplemented: true,
},

'industrybrains': {
prefetch: 'https://web.industrybrains.com/js/ads/async/show.js',
preconnect: [
Expand Down
11 changes: 11 additions & 0 deletions ads/vendors/incrementx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {validateData, writeScript} from '#3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function incrementx(global, data) {
validateData(data, ['vzid']);
global.ixParam = data;
writeScript(global, 'https://cdn.incrementxserv.com/ixamp.js');
}
20 changes: 20 additions & 0 deletions ads/vendors/incrementx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# incrementx

## Example

```html
<amp-ad
width="320"
height="50"
type="incrementx"
data-vzid="PNXW125273VB49B96">
</amp-ad>
```

## Configuration

For configuration details and to generate your tags, please contact https://www.incrementx.com/contact-us.

Supported parameters:

- `data-vzid`
7 changes: 7 additions & 0 deletions examples/amp-ad/ads.amp.esm.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<option>imedia</option>
<option>imobile</option>
<option>imonomy</option>
<option>incrementx</option>
<option>industrybrains</option>
<option>inmobi</option>
<option>innity</option>
Expand Down Expand Up @@ -1335,6 +1336,12 @@ <h2>Imedia</h2>
data-positions='[{"id":"p1", "zoneId":"seznam.novinky.ikona2"}, {"id":"p2", "zoneId":"seznam.novinky.ikona"}]'>
</amp-ad>

<h2>IncrementX</h2>
<amp-ad width="320" height="50"
type="incrementx"
data-vzid="PNXW125273VB49B96">
</amp-ad>

<h2>Index Exchange Header Tag</h2>
<amp-ad width="300" height="250"
type="ix"
Expand Down
5 changes: 5 additions & 0 deletions examples/amp-ad/ads.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
<option>imedia</option>
<option>imobile</option>
<option>imonomy</option>
<option>incrementx</option>
<option>industrybrains</option>
<option>inmobi</option>
<option>innity</option>
Expand Down Expand Up @@ -1192,6 +1193,10 @@ <h2>Imedia</h2>
data-positions='[{"id":"p1", "zoneId":"seznam.novinky.ikona2"}, {"id":"p2", "zoneId":"seznam.novinky.ikona"}]'>
</amp-ad>

<h2>IncrementX</h2>
<amp-ad width="300" height="250" type="incrementx" data-vzid="PNXW125273VB49B96">
</amp-ad>

<h2>Index Exchange Header Tag</h2>
<amp-ad width="300" height="250" type="ix" data-ix-id="1" data-slot="/62650033/AMP_Example_Ad_Unit">
</amp-ad>
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati
- [Imonomy](../../ads/vendors/imonomy.md)
- [Imedia](../../ads/vendors/imedia.md)
- [Improve Digital](../../ads/vendors/improvedigital.md)
- [IncrementX](../../ads/vendors/incrementx.md)
- [Insticator](../../ads/vendors/insticator.md)
- [InsurAds](../../ads/vendors/insurads.md)
- [Index Exchange](../../ads/vendors/ix.md)
Expand Down
5 changes: 5 additions & 0 deletions validator/testdata/feature_tests/ads.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
<option>ibillboard</option>
<option>imobile</option>
<option>imedia</option>
<option>incrementx</option>
<option>industrybrains</option>
<option>inmobi</option>
<option>ix</option>
Expand Down Expand Up @@ -804,6 +805,10 @@ <h2>Imedia</h2>
data-positions='[{"id":"p1", "zoneId":"seznam.novinky.ikona2"}, {"id":"p2", "zoneId":"seznam.novinky.ikona"}]'>
</amp-ad>

<h2>IncrementX</h2>
<amp-ad width="320" height="50" type="incrementx" data-vzid="PNXW125273VB49B96">
</amp-ad>

<h2>Industrybrains</h2>
<amp-ad width="300" height="250"
type="industrybrains"
Expand Down

0 comments on commit 2b25653

Please sign in to comment.