From 4633ed5d55daf02fb11df865e13cfc8e8cda5766 Mon Sep 17 00:00:00 2001 From: Lior Praiss Date: Wed, 9 Jan 2019 16:14:24 +0200 Subject: [PATCH 1/6] first commit --- 3p/integration.js | 3 +++ ads/_config.js | 6 ++++++ examples/ads.amp.html | 7 +++++++ extensions/amp-ad/amp-ad.md | 1 + 4 files changed, 17 insertions(+) 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/examples/ads.amp.html b/examples/ads.amp.html index d45500632356..91b3045191c6 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -1661,6 +1661,13 @@

SOVRN

data-z="393900"> +

Spot.IM widget

+ + +

SpotX

Date: Wed, 9 Jan 2019 16:14:54 +0200 Subject: [PATCH 2/6] added spotim-ad files --- ads/spotim.js | 11 +++++++++++ ads/spotim.md | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 ads/spotim.js create mode 100644 ads/spotim.md diff --git a/ads/spotim.js b/ads/spotim.js new file mode 100644 index 000000000000..4de79c48f0f5 --- /dev/null +++ b/ads/spotim.js @@ -0,0 +1,11 @@ + +import {loadScript, validateData} from '../3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function spotim(global, data) { + validateData(data, ['spotId']); + loadScript(global, `http://localhost:6050/spot/${data.spotId}/amp`); +} diff --git a/ads/spotim.md b/ads/spotim.md new file mode 100644 index 000000000000..8134f9aa0a91 --- /dev/null +++ b/ads/spotim.md @@ -0,0 +1,2 @@ + +# to be filled later \ No newline at end of file From 9e626bd61b6eef34a4464e4dab493b7cac911b1e Mon Sep 17 00:00:00 2001 From: Lior Praiss Date: Mon, 14 Jan 2019 13:46:26 +0200 Subject: [PATCH 3/6] updated spotim.js --- ads/spotim.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ads/spotim.js b/ads/spotim.js index 4de79c48f0f5..ba0980d405e0 100644 --- a/ads/spotim.js +++ b/ads/spotim.js @@ -7,5 +7,6 @@ import {loadScript, validateData} from '../3p/3p'; */ export function spotim(global, data) { validateData(data, ['spotId']); - loadScript(global, `http://localhost:6050/spot/${data.spotId}/amp`); + loadScript(global, 'http://localhost:6050/amp-ad-launcher/'); + global.__SPOTIM_AMP__ = {spotId: data.spotId, postId: data.postId}; } From 1a68ebd6a7b3e4c3cf57895ef2c0764cddda00a9 Mon Sep 17 00:00:00 2001 From: Lior Praiss Date: Mon, 14 Jan 2019 14:22:14 +0200 Subject: [PATCH 4/6] updated spotim.md --- ads/spotim.md | 39 ++++++++++++++++++++++++++++++++++++++- examples/ads.amp.html | 3 ++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ads/spotim.md b/ads/spotim.md index 8134f9aa0a91..4f6cebf12de2 100644 --- a/ads/spotim.md +++ b/ads/spotim.md @@ -1,2 +1,39 @@ + + +# 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. + +### Optional parameters + +- `data-post-id`: Article Id \ No newline at end of file diff --git a/examples/ads.amp.html b/examples/ads.amp.html index 91b3045191c6..e1266ec16bcd 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -1664,7 +1664,8 @@

SOVRN

Spot.IM widget

From f919ab1f5aafa17d402bd9d1e311e5fad9ba63c4 Mon Sep 17 00:00:00 2001 From: Lior Praiss Date: Mon, 14 Jan 2019 17:00:42 +0200 Subject: [PATCH 5/6] updated spotim.md --- ads/spotim.js | 4 ++-- ads/spotim.md | 4 +--- examples/ads.amp.html | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ads/spotim.js b/ads/spotim.js index ba0980d405e0..81fec9de54a7 100644 --- a/ads/spotim.js +++ b/ads/spotim.js @@ -6,7 +6,7 @@ import {loadScript, validateData} from '../3p/3p'; * @param {!Object} data */ export function spotim(global, data) { - validateData(data, ['spotId']); - loadScript(global, 'http://localhost:6050/amp-ad-launcher/'); + 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 index 4f6cebf12de2..91b52c50f2e1 100644 --- a/ads/spotim.md +++ b/ads/spotim.md @@ -22,6 +22,7 @@ limitations under the License. ``` @@ -33,7 +34,4 @@ For configuration details, please contact Spot.IM's Account Management Team. ### Required parameters - `data-spot-id`: Publisher Id Provided by Account Management Team. - -### Optional parameters - - `data-post-id`: Article Id \ No newline at end of file diff --git a/examples/ads.amp.html b/examples/ads.amp.html index e1266ec16bcd..86b65633ce78 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -1662,9 +1662,9 @@

SOVRN

Spot.IM widget

- From 28a049a1f8ef8100519f30fc0b42342bc3d114e6 Mon Sep 17 00:00:00 2001 From: Lior Praiss Date: Wed, 6 Mar 2019 14:38:22 +0200 Subject: [PATCH 6/6] updated ads.amp.html --- ads/spotim.md | 4 ++-- examples/ads.amp.html | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ads/spotim.md b/ads/spotim.md index 91b52c50f2e1..ca001d3e5851 100644 --- a/ads/spotim.md +++ b/ads/spotim.md @@ -19,7 +19,7 @@ limitations under the License. ## Example ```html -sortable + @@ -1662,10 +1663,10 @@

SOVRN

Spot.IM widget

-