From 84c346bd45b9e7449dd6b4141b6e695378b4baef Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Tue, 16 Apr 2019 14:21:29 +0300 Subject: [PATCH 01/19] Support for MGID | Idealmedia | Lentainform ads network --- 3p/integration.js | 6 ++++++ ads/_config.js | 12 +++++++++++ ads/idealmedia.js | 38 ++++++++++++++++++++++++++++++++++ ads/idealmedia.md | 41 +++++++++++++++++++++++++++++++++++++ ads/lentainform.js | 38 ++++++++++++++++++++++++++++++++++ ads/lentainform.md | 41 +++++++++++++++++++++++++++++++++++++ ads/mgid.js | 38 ++++++++++++++++++++++++++++++++++ ads/mgid.md | 41 +++++++++++++++++++++++++++++++++++++ examples/ads.amp.html | 27 ++++++++++++++++++++++++ extensions/amp-ad/amp-ad.md | 3 +++ 10 files changed, 285 insertions(+) create mode 100644 ads/idealmedia.js create mode 100644 ads/idealmedia.md create mode 100644 ads/lentainform.js create mode 100644 ads/lentainform.md create mode 100644 ads/mgid.js create mode 100644 ads/mgid.md diff --git a/3p/integration.js b/3p/integration.js index 3ed5db951db7..219f66fd8afb 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -266,6 +266,9 @@ import {zen} from '../ads/zen'; import {zergnet} from '../ads/zergnet'; import {zucks} from '../ads/zucks'; import {speakol} from '../ads/speakol'; +import {mgid} from '../ads/mgid'; +import {lentainform} from '../ads/lentainform'; +import {idealmedia} from '../ads/idealmedia'; /** @@ -513,6 +516,9 @@ register('zen', zen); register('zergnet', zergnet); register('zucks', zucks); register('speakol', speakol); +register('mgid', mgid); +register('lentainform', lentainform); +register('idealmedia', idealmedia); // For backward compat, we always allow these types without the iframe // opting in. diff --git a/ads/_config.js b/ads/_config.js index f24bde1ab255..592ee5e50303 100644 --- a/ads/_config.js +++ b/ads/_config.js @@ -1127,4 +1127,16 @@ export const adConfig = { renderStartImplemented: true, }, + 'mgid': { + renderStartImplemented: true, + }, + + 'lentainform': { + renderStartImplemented: true, + }, + + 'idealmedia': { + renderStartImplemented: true, + }, + }; diff --git a/ads/idealmedia.js b/ads/idealmedia.js new file mode 100644 index 000000000000..d04d7cd74967 --- /dev/null +++ b/ads/idealmedia.js @@ -0,0 +1,38 @@ +/** + * Copyright 2018 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {loadScript, validateData} from '../3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function idealmedia(global, data) { + validateData(data, ['publisher', 'widget', 'container'], ['url']); + + const scriptRoot = document.createElement('div'); + scriptRoot.id = data.container; + + document.body.appendChild(scriptRoot); + + const url = `https://jsc.idealmedia.io/${encodeURIComponent(data.publisher[0])}/` + + `${encodeURIComponent(data.publisher[1])}/` + + `${encodeURIComponent(data.publisher)}.` + + `${encodeURIComponent(data.widget)}.js?t=` + + Math.floor(Date.now() / 36e5); + + loadScript(global, data.url || url); +} diff --git a/ads/idealmedia.md b/ads/idealmedia.md new file mode 100644 index 000000000000..c92b1080afac --- /dev/null +++ b/ads/idealmedia.md @@ -0,0 +1,41 @@ + + +# Idealmedia + +## Example + +### Basic + +```html + + +``` + +## Configuration + +For details on the configuration semantics, please contact the ad network or refer to their documentation. + +Supported parameters: + +- `data-publisher` +- `data-widget` +- `data-container` +- `data-url` diff --git a/ads/lentainform.js b/ads/lentainform.js new file mode 100644 index 000000000000..5dfbf9cb297c --- /dev/null +++ b/ads/lentainform.js @@ -0,0 +1,38 @@ +/** + * Copyright 2018 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {loadScript, validateData} from '../3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function lentainform(global, data) { + validateData(data, ['publisher', 'widget', 'container'], ['url']); + + const scriptRoot = document.createElement('div'); + scriptRoot.id = data.container; + + document.body.appendChild(scriptRoot); + + const url = `https://jsc.lentainform.com/${encodeURIComponent(data.publisher[0])}/` + + `${encodeURIComponent(data.publisher[1])}/` + + `${encodeURIComponent(data.publisher)}.` + + `${encodeURIComponent(data.widget)}.js?t=` + + Math.floor(Date.now() / 36e5); + + loadScript(global, data.url || url); +} diff --git a/ads/lentainform.md b/ads/lentainform.md new file mode 100644 index 000000000000..dbeebfe7baee --- /dev/null +++ b/ads/lentainform.md @@ -0,0 +1,41 @@ + + +# Lentainform + +## Example + +### Basic + +```html + + +``` + +## Configuration + +For details on the configuration semantics, please contact the ad network or refer to their documentation. + +Supported parameters: + +- `data-publisher` +- `data-widget` +- `data-container` +- `data-url` diff --git a/ads/mgid.js b/ads/mgid.js new file mode 100644 index 000000000000..f129d16e787a --- /dev/null +++ b/ads/mgid.js @@ -0,0 +1,38 @@ +/** + * Copyright 2018 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {loadScript, validateData} from '../3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function mgid(global, data) { + validateData(data, ['publisher', 'widget', 'container'], ['url']); + + const scriptRoot = document.createElement('div'); + scriptRoot.id = data.container; + + document.body.appendChild(scriptRoot); + + const url = `https://jsc.mgid.com/${encodeURIComponent(data.publisher[0])}/` + + `${encodeURIComponent(data.publisher[1])}/` + + `${encodeURIComponent(data.publisher)}.` + + `${encodeURIComponent(data.widget)}.js?t=` + + Math.floor(Date.now() / 36e5); + + loadScript(global, data.url || url); +} diff --git a/ads/mgid.md b/ads/mgid.md new file mode 100644 index 000000000000..22e3071771bc --- /dev/null +++ b/ads/mgid.md @@ -0,0 +1,41 @@ + + +# MGID + +## Example + +### Basic + +```html + + +``` + +## Configuration + +For details on the configuration semantics, please contact the ad network or refer to their documentation. + +Supported parameters: + +- `data-publisher` +- `data-widget` +- `data-container` +- `data-url` diff --git a/examples/ads.amp.html b/examples/ads.amp.html index ed9a84ec4003..094ea3c52a0a 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -249,6 +249,9 @@ + + + @@ -2084,5 +2087,29 @@

Zucks

data-zoe-multi-ad="true"> +

Mgid

+ + + +

Lentainform

+ + + +

Idealmedia

+ + + diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 6281d39b18af..10c1c037de4f 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -387,6 +387,9 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/ - [Yieldpro](../../ads/yieldpro.md) - [Zedo](../../ads/zedo.md) - [Zucks](../../ads/zucks.md) +- [Mgid](../../ads/mgid.md) +- [Lentainform](../../ads/lentainform.md) +- [Idealmedia](../../ads/idealmedia.md) ## Supported embed types From 3b8e0427dcce8c00787602f1d923ace531d6dfe9 Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Tue, 16 Apr 2019 16:05:19 +0300 Subject: [PATCH 02/19] update From 11be96d7709400580ce1e1848773adb8df51540c Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Tue, 16 Apr 2019 16:05:19 +0300 Subject: [PATCH 03/19] test trigger From ecb21d29d683de900c673eb97f7b51f906a7892c Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Wed, 17 Apr 2019 18:46:22 +0300 Subject: [PATCH 04/19] Support for MGID | Idealmedia | Lentainform ads network --- build-system/tasks/visual-diff/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system/tasks/visual-diff/index.js b/build-system/tasks/visual-diff/index.js index 2efb068228e8..e35e29b422fd 100644 --- a/build-system/tasks/visual-diff/index.js +++ b/build-system/tasks/visual-diff/index.js @@ -53,7 +53,7 @@ const VIEWPORT_HEIGHT = 100000; const HOST = 'localhost'; const PORT = 8000; const WEBSERVER_TIMEOUT_RETRIES = 10; -const NAVIGATE_TIMEOUT_MS = 3000; +const NAVIGATE_TIMEOUT_MS = 7000; const MAX_PARALLEL_TABS = 10; const WAIT_FOR_TABS_MS = 1000; const BUILD_STATUS_URL = 'https://amphtml-percy-status-checker.appspot.com/status'; From 5b3329da51568c169655a3d60ecc69decd688c45 Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Thu, 18 Apr 2019 12:39:08 +0300 Subject: [PATCH 05/19] test trigger --- build-system/tasks/visual-diff/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system/tasks/visual-diff/index.js b/build-system/tasks/visual-diff/index.js index 0b3d11f01acc..1d31d87eb7e2 100644 --- a/build-system/tasks/visual-diff/index.js +++ b/build-system/tasks/visual-diff/index.js @@ -53,7 +53,7 @@ const VIEWPORT_HEIGHT = 100000; const HOST = 'localhost'; const PORT = 8000; const WEBSERVER_TIMEOUT_RETRIES = 10; -const NAVIGATE_TIMEOUT_MS = 7000; +const NAVIGATE_TIMEOUT_MS = 3000; const MAX_PARALLEL_TABS = 10; const WAIT_FOR_TABS_MS = 1000; const BUILD_STATUS_URL = 'https://amphtml-percy-status-checker.appspot.com/status'; From 38f5dc1db63aaa1d9a16bc1ef9601e7ef654cea4 Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Tue, 18 Jun 2019 19:48:45 +0300 Subject: [PATCH 06/19] Lentainform new improvements --- 3p/integration.js | 1 + ads/_config.js | 7 ++++++- ads/lentainform.js | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/3p/integration.js b/3p/integration.js index 2f6367725254..0e540429a6db 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -278,6 +278,7 @@ const AMP_EMBED_ALLOWED = { 'mantis-recommend': true, miximedia: true, mywidget: true, + lentainform: true, opinary: true, outbrain: true, plista: true, diff --git a/ads/_config.js b/ads/_config.js index fb21c931c331..2cea9842a616 100755 --- a/ads/_config.js +++ b/ads/_config.js @@ -544,7 +544,12 @@ export const adConfig = { 'kuadio': {}, 'lentainform': { - renderStartImplemented: false, + renderStartImplemented: true, + prefetch: [ + 'https://jsc.lentainform.com', + 'https://servicer.lentainform.com', + 'https://s-img.lentainform.com', + ], }, 'ligatus': { diff --git a/ads/lentainform.js b/ads/lentainform.js index 40bcc3a9ac7d..48aef54a930f 100644 --- a/ads/lentainform.js +++ b/ads/lentainform.js @@ -35,5 +35,12 @@ export function lentainform(global, data) { `${encodeURIComponent(data.widget)}.js?t=` + Math.floor(Date.now() / 36e5); + window.context.observeIntersection(function(changes) { + changes.forEach(function(c) { + window['intersectionRect' + data.widget] = c.intersectionRect; + window['boundingClientRect' + data.widget] = c.boundingClientRect; + }); + }); + loadScript(global, data.url || url); } From cbe9046b76908d906f6950b90caec2b9cd4aca8b Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Thu, 27 Jun 2019 12:45:17 +0300 Subject: [PATCH 07/19] Idealmedia fix --- examples/ads.amp.html | 28 ---------------------------- extensions/amp-ad/amp-ad.md | 3 --- 2 files changed, 31 deletions(-) diff --git a/examples/ads.amp.html b/examples/ads.amp.html index 51a2c49ae6df..a06073448637 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -257,9 +257,6 @@ - - - @@ -2146,30 +2143,5 @@

Zucks

data-frame-id="_29845b2931" data-zoe-multi-ad="true"> - -

Mgid

- - - -

Lentainform

- - - -

Idealmedia

- - - diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 200d31881e5e..2ed25e6e5727 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -395,9 +395,6 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/ - [Yieldpro](../../ads/yieldpro.md) - [Zedo](../../ads/zedo.md) - [Zucks](../../ads/zucks.md) -- [Mgid](../../ads/mgid.md) -- [Lentainform](../../ads/lentainform.md) -- [Idealmedia](../../ads/idealmedia.md) ## Supported embed types From 0c9be2d489d52d6de8e2afb72e1e035965d7512e Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Thu, 27 Jun 2019 12:47:53 +0300 Subject: [PATCH 08/19] Revert "Idealmedia fix" This reverts commit cbe9046b76908d906f6950b90caec2b9cd4aca8b. --- examples/ads.amp.html | 28 ++++++++++++++++++++++++++++ extensions/amp-ad/amp-ad.md | 3 +++ 2 files changed, 31 insertions(+) diff --git a/examples/ads.amp.html b/examples/ads.amp.html index a06073448637..51a2c49ae6df 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -257,6 +257,9 @@ + + + @@ -2143,5 +2146,30 @@

Zucks

data-frame-id="_29845b2931" data-zoe-multi-ad="true"> + +

Mgid

+ + + +

Lentainform

+ + + +

Idealmedia

+ + + diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 2ed25e6e5727..200d31881e5e 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -395,6 +395,9 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/ - [Yieldpro](../../ads/yieldpro.md) - [Zedo](../../ads/zedo.md) - [Zucks](../../ads/zucks.md) +- [Mgid](../../ads/mgid.md) +- [Lentainform](../../ads/lentainform.md) +- [Idealmedia](../../ads/idealmedia.md) ## Supported embed types From 7ea09a7edc8e23cc2f9b4e16789200b98a2323a0 Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Thu, 27 Jun 2019 12:49:09 +0300 Subject: [PATCH 09/19] idealmedia fix --- examples/ads.amp.html | 28 ---------------------------- extensions/amp-ad/amp-ad.md | 3 --- 2 files changed, 31 deletions(-) diff --git a/examples/ads.amp.html b/examples/ads.amp.html index 51a2c49ae6df..a06073448637 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -257,9 +257,6 @@ - - - @@ -2146,30 +2143,5 @@

Zucks

data-frame-id="_29845b2931" data-zoe-multi-ad="true"> - -

Mgid

- - - -

Lentainform

- - - -

Idealmedia

- - - diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 200d31881e5e..2ed25e6e5727 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -395,9 +395,6 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/ - [Yieldpro](../../ads/yieldpro.md) - [Zedo](../../ads/zedo.md) - [Zucks](../../ads/zucks.md) -- [Mgid](../../ads/mgid.md) -- [Lentainform](../../ads/lentainform.md) -- [Idealmedia](../../ads/idealmedia.md) ## Supported embed types From b7c04fa3400e70ef8f1643d617d2780698763815 Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Thu, 27 Jun 2019 12:51:56 +0300 Subject: [PATCH 10/19] Revert "idealmedia fix" This reverts commit 7ea09a7edc8e23cc2f9b4e16789200b98a2323a0. --- examples/ads.amp.html | 28 ++++++++++++++++++++++++++++ extensions/amp-ad/amp-ad.md | 3 +++ 2 files changed, 31 insertions(+) diff --git a/examples/ads.amp.html b/examples/ads.amp.html index a06073448637..51a2c49ae6df 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -257,6 +257,9 @@ + + + @@ -2143,5 +2146,30 @@

Zucks

data-frame-id="_29845b2931" data-zoe-multi-ad="true"> + +

Mgid

+ + + +

Lentainform

+ + + +

Idealmedia

+ + + diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 2ed25e6e5727..200d31881e5e 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -395,6 +395,9 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/ - [Yieldpro](../../ads/yieldpro.md) - [Zedo](../../ads/zedo.md) - [Zucks](../../ads/zucks.md) +- [Mgid](../../ads/mgid.md) +- [Lentainform](../../ads/lentainform.md) +- [Idealmedia](../../ads/idealmedia.md) ## Supported embed types From e6f980d6d096340199654d570361dcf75033ce00 Mon Sep 17 00:00:00 2001 From: Denys Siroshtan Date: Thu, 27 Jun 2019 12:54:53 +0300 Subject: [PATCH 11/19] Idealmedia fix --- examples/ads.amp.html | 28 ---------------------------- extensions/amp-ad/amp-ad.md | 3 --- 2 files changed, 31 deletions(-) diff --git a/examples/ads.amp.html b/examples/ads.amp.html index 51a2c49ae6df..a06073448637 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -257,9 +257,6 @@ - - - @@ -2146,30 +2143,5 @@

Zucks

data-frame-id="_29845b2931" data-zoe-multi-ad="true"> - -

Mgid

- - - -

Lentainform

- - - -

Idealmedia

- - - diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 200d31881e5e..2ed25e6e5727 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -395,9 +395,6 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/ - [Yieldpro](../../ads/yieldpro.md) - [Zedo](../../ads/zedo.md) - [Zucks](../../ads/zucks.md) -- [Mgid](../../ads/mgid.md) -- [Lentainform](../../ads/lentainform.md) -- [Idealmedia](../../ads/idealmedia.md) ## Supported embed types From 641b31b44fc0ad74bd8b9370e6142226d13b7d7c Mon Sep 17 00:00:00 2001 From: Max Prihodko Date: Thu, 24 Dec 2020 11:06:06 +0200 Subject: [PATCH 12/19] =?UTF-8?q?=F0=9F=93=96=20Moved=20types=20in=20the?= =?UTF-8?q?=20amp-ad.md=20to=20embed=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved the types for the MGID, Lentainform and Idealmedia to the Supported embed types section. --- extensions/amp-ad/amp-ad.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 22967534764d..080d0e5f513c 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -349,7 +349,6 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati - [GumGum](../../ads/gumgum.md) - [Holder](../../ads/holder.md) - [iBillboard](../../ads/ibillboard.md) -- [Idealmedia](../../ads/idealmedia.md) - [I-Mobile](../../ads/imobile.md) - [Imonomy](../../ads/imonomy.md) - [Imedia](../../ads/imedia.md) @@ -365,7 +364,6 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati - [Kiosked](../../ads/kiosked.md) - [Kixer](../../ads/kixer.md) - [Kuadio](../../ads/kuadio.md) -- [Lentainform](../../ads/lentainform.md) - [Ligatus](../../ads/ligatus.md) - [LockerDome](../../ads/lockerdome.md) - [LOGLY](../../ads/logly.md) @@ -380,7 +378,6 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati - [Mediavine](../../ads/mediavine.md) - [Medyanet](../../ads/medyanet.md) - [Meg](../../ads/meg.md) -- [Mgid](../../ads/mgid.md) - [MicroAd](../../ads/microad.md) - [MixiMedia](../../ads/miximedia.md) - [Mixpo](../../ads/mixpo.md) @@ -496,8 +493,11 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati - [Dable](../../ads/dable.md) - [Engageya](../../ads/engageya.md) - [Epeex](../../ads/epeex.md) +- [Idealmedia](../../ads/idealmedia.md) - [Insticator](../../ads/insticator.md) - [Jubna](../../ads/jubna.md) +- [Lentainform](../../ads/lentainform.md) +- [Mgid](../../ads/mgid.md) - [Outbrain](../../ads/outbrain.md) - [Postquare](../../ads/postquare.md) - [PubExchange](../../ads/pubexchange.md) From faa9c048c7702dcfb0867b84938897516c668ef0 Mon Sep 17 00:00:00 2001 From: maxprihodko8 Date: Fri, 1 Jan 2021 00:47:16 +0000 Subject: [PATCH 13/19] (2019-10-01, 0ab715ef1) `amp-action-macro`: 1 Previous history on prod-config.json: - 0ab715ef1 - 2019-10-01T10:32:36-04:00 - Launch --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - extensions/amp-action-macro/0.1/amp-action-macro.js | 4 ++-- .../amp-action-macro/0.1/test/test-amp-action-macro.js | 8 ++------ tools/experiments/experiments-config.js | 6 ------ 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index f4c45ff2c4d7..15797f63ecae 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -5,7 +5,6 @@ "canary": 1, "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, - "amp-action-macro": 1, "amp-story-responsive-units": 1, "amp-story-v1": 1, "chunked-amp": 1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 73958306dfa7..c836ca5d8e5e 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -5,7 +5,6 @@ "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, "amp-accordion-display-locking": 1, - "amp-action-macro": 1, "amp-story-responsive-units": 1, "amp-story-v1": 1, "chunked-amp": 1, diff --git a/extensions/amp-action-macro/0.1/amp-action-macro.js b/extensions/amp-action-macro/0.1/amp-action-macro.js index 199c9fbbdeda..f722181715f3 100644 --- a/extensions/amp-action-macro/0.1/amp-action-macro.js +++ b/extensions/amp-action-macro/0.1/amp-action-macro.js @@ -15,7 +15,6 @@ */ import {LayoutPriority} from '../../../src/layout'; import {Services} from '../../../src/services'; -import {isExperimentOn} from '../../../src/experiments'; import {userAssert} from '../../../src/log'; /** @const {string} */ @@ -39,7 +38,8 @@ export class AmpActionMacro extends AMP.BaseElement { /** @override */ buildCallback() { userAssert( - isExperimentOn(this.win, 'amp-action-macro'), + /* isExperimentOn(this.win, 'amp-action-macro') // launched: true */ + true, 'Experiment is off' ); const {element} = this; diff --git a/extensions/amp-action-macro/0.1/test/test-amp-action-macro.js b/extensions/amp-action-macro/0.1/test/test-amp-action-macro.js index 4759511a07a3..52f334bc776c 100644 --- a/extensions/amp-action-macro/0.1/test/test-amp-action-macro.js +++ b/extensions/amp-action-macro/0.1/test/test-amp-action-macro.js @@ -18,7 +18,6 @@ import {ActionInvocation} from '../../../../src/service/action-impl'; import {ActionTrust} from '../../../../src/action-constants'; import {AmpActionMacro} from '../amp-action-macro'; import {Services} from '../../../../src/services'; -import {toggleExperiment} from '../../../../src/experiments'; describes.realWin( 'amp-action-macro', @@ -35,8 +34,6 @@ describes.realWin( beforeEach(() => { win = env.win; doc = win.document; - - toggleExperiment(win, 'amp-action-macro', true); }); function newActionMacro() { @@ -60,7 +57,8 @@ describes.realWin( it('should not build if experiment is off', () => { return allowConsoleError(() => { - toggleExperiment(env.win, 'amp-action-macro', false); + /* toggleExperiment(env.win, 'amp-action-macro', false) // launched: true */ + false; return newActionMacro().catch((err) => { expect(err.message).to.include('Experiment is off'); }); @@ -75,8 +73,6 @@ describes.realWin( let unreferrableMacro; let unreferrableMacroElement; beforeEach(() => { - toggleExperiment(win, 'amp-action-macro', true); - // This macro is referrable and can be invoked by the macro element(s) // defined after it. referrableMacroElement = doc.createElement('amp-action-macro'); diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index 999e1490fbad..fcedc01b7468 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -75,12 +75,6 @@ export const EXPERIMENTS = [ name: 'Allows the new lightbox experience to be used in A4A (prototype).', spec: 'https://github.com/ampproject/amphtml/issues/7743', }, - { - id: 'amp-action-macro', - name: 'AMP extension for defining action macros', - spec: 'https://github.com/ampproject/amphtml/issues/19494', - cleanupIssue: 'https://github.com/ampproject/amphtml/pull/19495', - }, { id: 'ios-fixed-no-transfer', name: 'Remove fixed transfer from iOS 12.2 and up', From f704b1ddac4bbeff9ac1cc9b0baab7823ed61217 Mon Sep 17 00:00:00 2001 From: maxprihodko8 Date: Fri, 1 Jan 2021 00:47:33 +0000 Subject: [PATCH 14/19] (2018-11-05, d26327a3c) `amp-story-responsive-units`: 1 Previous history on prod-config.json: - d26327a3c - 2018-11-05T12:02:25-05:00 - Re-launch amp-story-responsive-units experiment - d5ec88b8a - 2018-10-30T16:01:59-07:00 - Unlaunch amp-story-responsive-units for urgent release - 65379df93 - 2018-10-26T15:27:09-04:00 - Launch amp-story-responsive-units experiment --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - extensions/amp-story/1.0/test/test-amp-story.js | 7 +++---- tools/experiments/experiments-config.js | 6 ------ 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index 15797f63ecae..422ffe0c3b1d 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -5,7 +5,6 @@ "canary": 1, "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, - "amp-story-responsive-units": 1, "amp-story-v1": 1, "chunked-amp": 1, "doubleclickSraExp": 0.01, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index c836ca5d8e5e..9ea054c8e093 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -5,7 +5,6 @@ "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, "amp-accordion-display-locking": 1, - "amp-story-responsive-units": 1, "amp-story-v1": 1, "chunked-amp": 1, "doubleclickSraExp": 0.01, diff --git a/extensions/amp-story/1.0/test/test-amp-story.js b/extensions/amp-story/1.0/test/test-amp-story.js index 1ac8cb2319e8..5d8162cbf8f6 100644 --- a/extensions/amp-story/1.0/test/test-amp-story.js +++ b/extensions/amp-story/1.0/test/test-amp-story.js @@ -1656,12 +1656,11 @@ describes.realWin( }); describe('amp-story rewriteStyles', () => { - beforeEach(() => { - toggleExperiment(win, 'amp-story-responsive-units', true); - }); + beforeEach(() => {}); afterEach(() => { - toggleExperiment(win, 'amp-story-responsive-units', false); + /* toggleExperiment(win, 'amp-story-responsive-units', false) // launched: true */ + false; }); it('should rewrite vw styles', async () => { diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index fcedc01b7468..97b857e2763c 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -124,12 +124,6 @@ export const EXPERIMENTS = [ spec: 'https://github.com/ampproject/amphtml/issues/11329', cleanupIssue: 'https://github.com/ampproject/amphtml/issues/14357', }, - { - id: 'amp-story-responsive-units', - name: 'Scale pages in amp-story by rewriting responsive units', - spec: 'https://github.com/ampproject/amphtml/issues/15955', - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/15960', - }, { id: 'amp-next-page', name: 'Document level next page recommendations and infinite scroll', From c89456733a84f4f054abe883b000df0af2a6bec4 Mon Sep 17 00:00:00 2001 From: maxprihodko8 Date: Fri, 1 Jan 2021 00:47:42 +0000 Subject: [PATCH 15/19] (2018-07-11, 366b9d53e) `amp-story-v1`: 1 Previous history on prod-config.json: - 366b9d53e - 2018-07-11T12:03:09-04:00 - Revert "Remove launched experiments. (#16528)" - 3a3dbd963 - 2018-07-06T14:47:49-04:00 - Remove launched experiments. - 1194c1652 - 2018-06-12T11:38:38-04:00 - Start canonical adsense fast fetch experiments at 1% --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - 2 files changed, 2 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index 422ffe0c3b1d..b0d51f598eb3 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -5,7 +5,6 @@ "canary": 1, "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, - "amp-story-v1": 1, "chunked-amp": 1, "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 9ea054c8e093..f4dd6725ea8e 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -5,7 +5,6 @@ "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, "amp-accordion-display-locking": 1, - "amp-story-v1": 1, "chunked-amp": 1, "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, From 0e1cecdc9ae48d2503ee82bca0b600f5e99c3a0c Mon Sep 17 00:00:00 2001 From: maxprihodko8 Date: Fri, 1 Jan 2021 00:47:50 +0000 Subject: [PATCH 16/19] (2018-07-11, 366b9d53e) `chunked-amp`: 1 Previous history on prod-config.json: - 366b9d53e - 2018-07-11T12:03:09-04:00 - Revert "Remove launched experiments. (#16528)" - 3a3dbd963 - 2018-07-06T14:47:49-04:00 - Remove launched experiments. - 34ffcdb16 - 2017-02-17T13:10:59-08:00 - turn on chunked-amp --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - tools/experiments/experiments-config.js | 5 ----- 3 files changed, 7 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index b0d51f598eb3..0381d7c79bba 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -5,7 +5,6 @@ "canary": 1, "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, - "chunked-amp": 1, "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, "dfp-render-on-idle-cwv-exp": 1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index f4dd6725ea8e..4852a098764e 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -5,7 +5,6 @@ "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, "amp-accordion-display-locking": 1, - "chunked-amp": 1, "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, "expand-json-targeting": 1, diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index 97b857e2763c..fd79ad85e0aa 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -81,11 +81,6 @@ export const EXPERIMENTS = [ spec: 'https://github.com/ampproject/amphtml/issues/22220', cleanupIssue: 'https://github.com/ampproject/amphtml/issues/22220', }, - { - id: 'chunked-amp', - name: "Split AMP's loading phase into chunks", - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/5535', - }, { id: 'pump-early-frame', name: From 608ff639f3bc0b6e9d87cc55beb53269f7481c68 Mon Sep 17 00:00:00 2001 From: maxprihodko8 Date: Fri, 1 Jan 2021 00:48:06 +0000 Subject: [PATCH 17/19] (2019-10-28, 4ca140956) `fix-inconsistent-responsive-height-selection`: 0 Previous history on prod-config.json: - 4ca140956 - 2019-10-28T15:54:36+00:00 - Ramp down inconsistent height selection fix experiment to 0%. This doesn't work very well on desktop / tablet so we need to fix that before proceeding. --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - tools/experiments/experiments-config.js | 6 ------ 3 files changed, 8 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index 0381d7c79bba..92e53d8a24e4 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -9,7 +9,6 @@ "doubleclickSraReportExcludedBlock": 0.1, "dfp-render-on-idle-cwv-exp": 1, "expand-json-targeting": 1, - "fix-inconsistent-responsive-height-selection": 0, "flexAdSlots": 0.05, "intersect-resources": 0, "ios-fixed-no-transfer": 1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 4852a098764e..ff9b32cf2eb7 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -8,7 +8,6 @@ "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, "expand-json-targeting": 1, - "fix-inconsistent-responsive-height-selection": 0, "flexAdSlots": 0.05, "intersect-resources": 0, "ios-fixed-no-transfer": 0, diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index fd79ad85e0aa..3c0ef1d97092 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -168,12 +168,6 @@ export const EXPERIMENTS = [ spec: 'https://github.com/ampproject/amphtml/issues/23568', cleanupIssue: 'https://github.com/ampproject/amphtml/issues/24165', }, - { - id: 'fix-inconsistent-responsive-height-selection', - name: 'Fix inconsistent responsive height selection.', - spec: 'https://github.com/ampproject/amphtml/issues/24166', - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/24167', - }, { id: 'intersect-resources', name: 'Use IntersectionObserver for resource scheduling.', From e119d7a0ba5b51ced7bb69d65baa8e387aa497c1 Mon Sep 17 00:00:00 2001 From: maxprihodko8 Date: Fri, 1 Jan 2021 00:48:23 +0000 Subject: [PATCH 18/19] (2017-05-16, ca2005971) `pump-early-frame`: 1 Previous history on prod-config.json: - ca2005971 - 2017-05-16T09:31:30-04:00 - Start Doubleclick Fast Fetch potential SRA delay measure experiment --- build-system/global-configs/canary-config.json | 3 +-- build-system/global-configs/prod-config.json | 3 +-- src/runtime.js | 2 +- test/unit/test-runtime.js | 4 ---- tools/experiments/experiments-config.js | 7 ------- 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index 92e53d8a24e4..08bbf5f439ec 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -1,6 +1,6 @@ { "allow-doc-opt-in": ["amp-next-page", "analytics-chunks-inabox"], - "allow-url-opt-in": ["pump-early-frame"], + "allow-url-opt-in": [], "amp-accordion-display-locking": 1, "canary": 1, "a4aProfilingRate": 0.01, @@ -12,7 +12,6 @@ "flexAdSlots": 0.05, "intersect-resources": 0, "ios-fixed-no-transfer": 1, - "pump-early-frame": 1, "remove-task-timeout": 0, "build-in-chunks": 1, "visibility-trigger-improvements": 1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index ff9b32cf2eb7..3806a71d57e7 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -1,6 +1,6 @@ { "allow-doc-opt-in": ["amp-next-page", "analytics-chunks-inabox"], - "allow-url-opt-in": ["pump-early-frame"], + "allow-url-opt-in": [], "canary": 0, "a4aProfilingRate": 0.01, "adsense-ad-size-optimization": 0.1, @@ -11,7 +11,6 @@ "flexAdSlots": 0.05, "intersect-resources": 0, "ios-fixed-no-transfer": 0, - "pump-early-frame": 1, "adsense-ptt-exp": 0.1, "doubleclick-ptt-exp": 0.1, "fie-resources": 0.1, diff --git a/src/runtime.js b/src/runtime.js index dc6a4ed7d4de..a21d6cfa970a 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -479,7 +479,7 @@ function maybeLoadCorrectVersion(win, fnOrStruct) { * pumped. */ function maybePumpEarlyFrame(win, cb) { - if (!isExperimentOn(win, 'pump-early-frame')) { + if (!(/* isExperimentOn(win, 'pump-early-frame') // launched: true */ true)) { cb(); return; } diff --git a/test/unit/test-runtime.js b/test/unit/test-runtime.js index a599a9e4f6c8..34b69645604c 100644 --- a/test/unit/test-runtime.js +++ b/test/unit/test-runtime.js @@ -33,7 +33,6 @@ import {installPlatformService} from '../../src/service/platform-impl'; import {installTimerService} from '../../src/service/timer-impl'; import {setShadowDomSupportedVersionForTesting} from '../../src/web-components'; import {toArray} from '../../src/types'; -import {toggleExperiment} from '../../src/experiments'; import {vsyncForTesting} from '../../src/service/vsync-impl'; describes.fakeWin( @@ -202,7 +201,6 @@ describes.fakeWin( ); it('should not maybePumpEarlyFrame when body not yet present', () => { - toggleExperiment(win, 'pump-early-frame', true); // Make document.body be null on first invocation to simulate // JS executing before the rest of the doc has been parsed. const {body} = win.document; @@ -223,14 +221,12 @@ describes.fakeWin( 'should not maybePumpEarlyFrame ' + 'when a renderDelayingExtension is present', () => { - toggleExperiment(win, 'pump-early-frame', true); win.document.body.appendChild(document.createElement('amp-experiment')); extensionRegistrationTest(); } ); it('should maybePumpEarlyFrame and delay extension execution', () => { - toggleExperiment(win, 'pump-early-frame', true); let progress = ''; const queueExtensions = win.AMP; const highPriority = regularExtension((amp) => { diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index 3c0ef1d97092..c485f9718fe4 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -81,13 +81,6 @@ export const EXPERIMENTS = [ spec: 'https://github.com/ampproject/amphtml/issues/22220', cleanupIssue: 'https://github.com/ampproject/amphtml/issues/22220', }, - { - id: 'pump-early-frame', - name: - 'If applicable, let the browser paint the current frame before ' + - 'executing the callback.', - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/8237', - }, { id: 'web-worker', name: 'Web worker for background processing', From d2239f5d7e41b0a4d4b07b3952ca2634a27618db Mon Sep 17 00:00:00 2001 From: maxprihodko8 Date: Fri, 1 Jan 2021 00:48:23 +0000 Subject: [PATCH 19/19] =?UTF-8?q?=F0=9F=9A=AE=20Sweep=20experiments=20olde?= =?UTF-8?q?r=20than=202020-01-01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sweep experiments last flipped globally up to 2020-01-01: - (2019-10-01, 0ab715ef1) `amp-action-macro`: 1 - (2018-11-05, d26327a3c) `amp-story-responsive-units`: 1 - (2018-07-11, 366b9d53e) `amp-story-v1`: 1 - (2018-07-11, 366b9d53e) `chunked-amp`: 1 - (2019-10-28, 4ca140956) `fix-inconsistent-responsive-height-selection`: 0 - (2017-05-16, ca2005971) `pump-early-frame`: 1 --- ### ⚠️ Javascript source files require intervention The following may contain errors and/or require intervention to remove superfluous conditionals: - `extensions/amp-action-macro/0.1/amp-action-macro.js` - `extensions/amp-action-macro/0.1/test/test-amp-action-macro.js` - `extensions/amp-story/1.0/test/test-amp-story.js` - `src/runtime.js` - `test/unit/test-runtime.js` Refer to the removal guide for [suggestions on handling these modified Javascript files.](https://github.com/ampproject/amphtml/blob/master/build-system/tasks/sweep-experiments/README.md#followup) --- ### ⚠️ HTML files may still contain references The following HTML files contain references to experiment names which may be stale and should be manually removed: - `examples/amp-action-macro.html` Refer to the removal guide for [suggestions on handling these HTML files.](https://github.com/ampproject/amphtml/blob/master/build-system/tasks/sweep-experiments/README.md#followup:html)