diff --git a/3p/integration.js b/3p/integration.js index 5618dc620d34..57e4c935a152 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -220,6 +220,7 @@ import {smi2} from '../ads/smi2'; import {sogouad} from '../ads/sogouad'; import {sortable} from '../ads/sortable'; import {sovrn} from '../ads/sovrn'; +import {spotim} from '../ads/spotim'; import {spotx} from '../ads/spotx'; import {sunmedia} from '../ads/sunmedia'; import {swoop} from '../ads/swoop'; @@ -277,6 +278,7 @@ const AMP_EMBED_ALLOWED = { pubexchange: true, smartclip: true, smi2: true, + spotim: true, taboola: true, zen: true, zergnet: true, @@ -449,6 +451,7 @@ register('smi2', smi2); register('sogouad', sogouad); register('sortable', sortable); register('sovrn', sovrn); +register('spotim', spotim); register('spotx', spotx); register('sunmedia', sunmedia); register('swoop', swoop); diff --git a/ads/_config.js b/ads/_config.js index ff02ba12e2b8..a7d2fb6a497c 100644 --- a/ads/_config.js +++ b/ads/_config.js @@ -875,6 +875,12 @@ export const adConfig = { prefetch: 'https://ap.lijit.com/www/sovrn_amp/sovrn_ads.js', }, + 'spotim': { + preconnect: [ + 'https://recirculation.spot.im', + ], + }, + 'spotx': { preconnect: 'https://js.spotx.tv', renderStartImplemented: true, diff --git a/ads/spotim.js b/ads/spotim.js new file mode 100644 index 000000000000..81fec9de54a7 --- /dev/null +++ b/ads/spotim.js @@ -0,0 +1,12 @@ + +import {loadScript, validateData} from '../3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function spotim(global, data) { + validateData(data, ['spotId', 'postId']); + loadScript(global, 'https://recirculation.spot.im/amp-ad-launcher/'); + global.__SPOTIM_AMP__ = {spotId: data.spotId, postId: data.postId}; +} diff --git a/ads/spotim.md b/ads/spotim.md new file mode 100644 index 000000000000..ca001d3e5851 --- /dev/null +++ b/ads/spotim.md @@ -0,0 +1,37 @@ + + +# Spot.IM + +## Example + +```html + + +``` + +## Configuration + +For configuration details, please contact Spot.IM's Account Management Team. + +### Required parameters + +- `data-spot-id`: Publisher Id Provided by Account Management Team. +- `data-post-id`: Article Id \ No newline at end of file diff --git a/examples/ads.amp.html b/examples/ads.amp.html index d45500632356..c3035815585d 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -206,6 +206,7 @@ + @@ -1661,6 +1662,14 @@

SOVRN

data-z="393900"> +

Spot.IM widget

+ + +

SpotX