diff --git a/3p/integration.js b/3p/integration.js index 3c04e2d0dd72..908c601391cb 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -237,6 +237,7 @@ import {runative} from '#ads/vendors/runative'; import {sas} from '#ads/vendors/sas'; import {seedingalliance} from '#ads/vendors/seedingalliance'; import {sekindo} from '#ads/vendors/sekindo'; +import {sevio} from '#ads/vendors/sevio'; import {sharethrough} from '#ads/vendors/sharethrough'; import {shemedia} from '#ads/vendors/shemedia'; import {sklik} from '#ads/vendors/sklik'; @@ -530,6 +531,7 @@ register('runative', runative); register('sas', sas); register('seedingalliance', seedingalliance); register('sekindo', sekindo); +register('sevio', sevio); register('sharethrough', sharethrough); register('shemedia', shemedia); register('sklik', sklik); diff --git a/3p/vendors/sevio.js b/3p/vendors/sevio.js new file mode 100644 index 000000000000..3a8b56ceea1a --- /dev/null +++ b/3p/vendors/sevio.js @@ -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 {sevio} from '#ads/vendors/sevio'; + +init(window); +register('sevio', sevio); + +window.draw3p = draw3p; diff --git a/ads/_config.js b/ads/_config.js index 1c679e197d7d..97a05243f224 100755 --- a/ads/_config.js +++ b/ads/_config.js @@ -1195,6 +1195,12 @@ const adConfig = jsonConfiguration({ renderStartImplemented: true, }, + 'sevio': { + preconnect: ['https://request.adx.ws'], + prefetch: ['https://cdn.adx.ws/scripts/amp.js'], + renderStartImplemented: true, + }, + 'sharethrough': { renderStartImplemented: true, }, diff --git a/ads/vendors/sevio.js b/ads/vendors/sevio.js new file mode 100644 index 000000000000..fb8bef0b6d03 --- /dev/null +++ b/ads/vendors/sevio.js @@ -0,0 +1,33 @@ +import {loadScript, validateData} from '#3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function sevio(global, data) { + validateData(data, ['zone']); + + const container = document.getElementById('c'); + const adDivId = 'sevioads-amp-' + encodeURIComponent(data.zone); + const adDiv = document.createElement('div'); + adDiv.setAttribute('id', adDivId); + container.appendChild(adDiv); + + loadScript( + global, + 'https://cdn.adx.ws/scripts/amp.js', + () => { + window.sevioAmpLoader = window.sevioAmpLoader || []; + window.sevioAmpLoader.push({ + zoneId: encodeURIComponent(data.zone), + placeholderId: encodeURIComponent(adDivId), + wu: window.location.href, + width: data.width, + height: data.height, + }); + }, + () => { + global.context.noContentAvailable(); + } + ); +} diff --git a/ads/vendors/sevio.md b/ads/vendors/sevio.md new file mode 100644 index 000000000000..d49a0a3df890 --- /dev/null +++ b/ads/vendors/sevio.md @@ -0,0 +1,19 @@ +# Sevio + +## Example of Sevio's model implementation + +### Basic + +```html + + +``` + +### Required parameters + +- `data-zone`: Zone ID diff --git a/examples/amp-ad/ads.amp.esm.html b/examples/amp-ad/ads.amp.esm.html index a366254ba0af..5408d4685971 100644 --- a/examples/amp-ad/ads.amp.esm.html +++ b/examples/amp-ad/ads.amp.esm.html @@ -243,6 +243,7 @@ + @@ -2014,6 +2015,12 @@

Sekindo

data-spaceId="14071"> +

Sevio

+ + +

Sharethrough

seedingalliance + @@ -1778,6 +1779,10 @@

Sekindo

+

Sevio

+ + +

Sharethrough

diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index e9de0eabb33a..170ba5536bdf 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -461,6 +461,7 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati - [SAS CI 360 Match](../../ads/vendors/sas.md) - [Seeding Alliance](../../ads/vendors/seedingalliance.md) - [Sekindo](../../ads/vendors/sekindo.md) +- [Sevio](../../ads/vendors/sevio.md) - [Sharethrough](../../ads/vendors/sharethrough.md) - [SHE Media](../../ads/vendors/shemedia.md) - [Sklik](../../ads/vendors/sklik.md)