From b28b22230d6976163fe332f6270ce6f285dc01da Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:30 +0000 Subject: [PATCH 1/9] (2021-01-20, a9e277820) `adsense-ad-size-optimization`: 1 Previous history on prod-config.json: - a9e277820 - 2021-01-20T20:47:24Z - Ramp up the adsense-ad-size-optimization experiment to 100%. --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - tools/experiments/experiments-config.js | 8 -------- 3 files changed, 10 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index bab436730446..afd3b6840d2a 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -4,7 +4,6 @@ "amp-accordion-display-locking": 1, "canary": 1, "a4aProfilingRate": 0.01, - "adsense-ad-size-optimization": 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 296c0cfa0fee..ab0ff0f8b954 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -3,7 +3,6 @@ "allow-url-opt-in": [], "canary": 0, "a4aProfilingRate": 0.01, - "adsense-ad-size-optimization": 1, "amp-accordion-display-locking": 1, "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index 3ae95cc6f1a0..e52114da11c4 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -153,14 +153,6 @@ export const EXPERIMENTS = [ spec: 'N/A', cleanupIssue: 'N/A', }, - { - id: 'adsense-ad-size-optimization', - name: - 'Per publisher server side settings for changing the ad size ' + - 'to responsive.', - spec: 'https://github.com/ampproject/amphtml/issues/23568', - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/24165', - }, { id: 'amp-stream-gallery', name: 'Enables component', From d48375352e037345e74a6ef900c8e258c60ae991 Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:34 +0000 Subject: [PATCH 2/9] (2020-11-19, cac02489d) `amp-accordion-display-locking`: 1 Previous history on prod-config.json: - cac02489d - 2020-11-19T12:26:09-05:00 - Increase from 10% to 100% --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - extensions/amp-accordion/0.1/amp-accordion.js | 5 ++--- extensions/amp-accordion/0.1/test/test-amp-accordion.js | 6 ++---- extensions/amp-accordion/1.0/amp-accordion.js | 4 ++-- extensions/amp-accordion/1.0/test/test-amp-accordion.js | 5 ++--- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index afd3b6840d2a..875812ba864f 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -1,7 +1,6 @@ { "allow-doc-opt-in": ["amp-next-page"], "allow-url-opt-in": [], - "amp-accordion-display-locking": 1, "canary": 1, "a4aProfilingRate": 0.01, "doubleclickSraExp": 0.01, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index ab0ff0f8b954..6db6be606b99 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -3,7 +3,6 @@ "allow-url-opt-in": [], "canary": 0, "a4aProfilingRate": 0.01, - "amp-accordion-display-locking": 1, "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, "expand-json-targeting": 1, diff --git a/extensions/amp-accordion/0.1/amp-accordion.js b/extensions/amp-accordion/0.1/amp-accordion.js index 22a5667ee72f..fdf35bfbad4a 100644 --- a/extensions/amp-accordion/0.1/amp-accordion.js +++ b/extensions/amp-accordion/0.1/amp-accordion.js @@ -27,7 +27,6 @@ import {createCustomEvent} from '../../../src/event-helper'; import {dev, devAssert, user, userAssert} from '../../../src/log'; import {dict} from '../../../src/utils/object'; import {getStyle, setImportantStyles, setStyles} from '../../../src/style'; -import {isExperimentOn} from '../../../src/experiments'; import { numeric, px, @@ -43,8 +42,8 @@ const EXPAND_CURVE_ = bezierCurve(0.47, 0, 0.745, 0.715); const COLLAPSE_CURVE_ = bezierCurve(0.39, 0.575, 0.565, 1); const isDisplayLockingEnabledForAccordion = (win) => - isExperimentOn(win, 'amp-accordion-display-locking') && - win.document.body.onbeforematch !== undefined; + /* isExperimentOn(win, 'amp-accordion-display-locking') // launched: true */ + true && win.document.body.onbeforematch !== undefined; class AmpAccordion extends AMP.BaseElement { /** @override @nocollapse */ diff --git a/extensions/amp-accordion/0.1/test/test-amp-accordion.js b/extensions/amp-accordion/0.1/test/test-amp-accordion.js index 162f2e2c1aaf..b31aa744dbe4 100644 --- a/extensions/amp-accordion/0.1/test/test-amp-accordion.js +++ b/extensions/amp-accordion/0.1/test/test-amp-accordion.js @@ -26,7 +26,6 @@ import { whenUpgradedToCustomElement, } from '../../../../src/dom'; import {poll} from '../../../../testing/iframe'; -import {toggleExperiment} from '../../../../src/experiments'; describes.realWin( 'amp-accordion', @@ -202,8 +201,6 @@ describes.realWin( }); it('should expand when beforematch event is triggered on a collapsed section', async () => { - // Enable display locking feature. - toggleExperiment(win, 'amp-accordion-display-locking', true); doc.body.onbeforematch = null; await getAmpAccordion(); const section = doc.querySelector('section:not([expanded])'); @@ -216,7 +213,8 @@ describes.realWin( expect(header.getAttribute('aria-expanded')).to.equal('true'); // Reset display locking feature - toggleExperiment(win, 'amp-accordion-display-locking', false); + /* toggleExperiment(win, 'amp-accordion-display-locking', false) // launched: true */ + false; doc.body.onbeforematch = undefined; }); diff --git a/extensions/amp-accordion/1.0/amp-accordion.js b/extensions/amp-accordion/1.0/amp-accordion.js index 22faa401454a..3164806a973d 100644 --- a/extensions/amp-accordion/1.0/amp-accordion.js +++ b/extensions/amp-accordion/1.0/amp-accordion.js @@ -44,8 +44,8 @@ class AmpAccordion extends BaseElement { const {win} = this; const displayLockingExperimentEnabled = - isExperimentOn(win, 'amp-accordion-display-locking') && - win.document.body.onbeforematch !== undefined; + /* isExperimentOn(win, 'amp-accordion-display-locking') // launched: true */ + true && win.document.body.onbeforematch !== undefined; if (displayLockingExperimentEnabled) { this.element.classList.add('i-amphtml-display-locking'); diff --git a/extensions/amp-accordion/1.0/test/test-amp-accordion.js b/extensions/amp-accordion/1.0/test/test-amp-accordion.js index 564b565aa619..d0929ad63c4f 100644 --- a/extensions/amp-accordion/1.0/test/test-amp-accordion.js +++ b/extensions/amp-accordion/1.0/test/test-amp-accordion.js @@ -55,7 +55,6 @@ describes.realWin( win = env.win; html = htmlFor(win.document); toggleExperiment(win, 'bento-accordion', true, true); - toggleExperiment(win, 'amp-accordion-display-locking', true, true); element = html`
@@ -658,7 +657,6 @@ describes.realWin( let defaultBeforeMatch; beforeEach(async () => { - toggleExperiment(win, 'amp-accordion-display-locking', true); element = html`
@@ -682,7 +680,8 @@ describes.realWin( afterEach(() => { win.CSS.supports = defaultCssSupports; win.document.body.onbeforematch = defaultBeforeMatch; - toggleExperiment(win, 'amp-accordion-display-locking', false); + /* toggleExperiment(win, 'amp-accordion-display-locking', false) // launched: true */ + false; }); it('should expand collpased section with beforematch event', async () => { From aeee97950ef40825e8535eb8949786c5436ca9e7 Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:35 +0000 Subject: [PATCH 3/9] (2020-08-14, 77ced1de0) `expand-json-targeting`: 1 Previous history on prod-config.json: - 77ced1de0 - 2020-08-14T15:52:39-07:00 - Ramp json targeting expansion experiment to 100% --- 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 875812ba864f..592363ba372a 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -6,7 +6,6 @@ "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, "dfp-render-on-idle-cwv-exp": 1, - "expand-json-targeting": 1, "flexAdSlots": 0.05, "ios-fixed-no-transfer": 1, "visibility-trigger-improvements": 1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 6db6be606b99..5b868da17b74 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -5,7 +5,6 @@ "a4aProfilingRate": 0.01, "doubleclickSraExp": 0.01, "doubleclickSraReportExcludedBlock": 0.1, - "expand-json-targeting": 1, "flexAdSlots": 0.05, "ios-fixed-no-transfer": 0, "visibility-trigger-improvements": 1, diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index e52114da11c4..1d83e864fd57 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -170,11 +170,6 @@ export const EXPERIMENTS = [ name: 'Remove signing requirement for AMPHTML ads', spec: 'https://github.com/ampproject/amphtml/issues/27189', }, - { - id: 'expand-json-targeting', - name: 'Allow CLIENT_ID in doubleclick json targeting feature', - spec: 'https://github.com/ampproject/amphtml/issues/25190', - }, { id: 'auto-ads-layout-callback', name: 'Move ads placement into layoutCallback', From 7417503cf34b0d640ccf1dd5586ea531d8b91bba Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:39 +0000 Subject: [PATCH 4/9] (2021-01-27, b73878986) `visibility-trigger-improvements`: 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous history on prod-config.json: - b73878986 - 2021-01-27T13:32:15-08:00 - Launch layout-aspect-ratio-css to 1% - c0de64daa - 2021-01-19T20:39:22-05:00 - Revert "✨ Implement sticky ad bottom type ad on amp-ad (#31491)" - 5f430805d - 2021-01-07T13:54:47-08:00 - ✨ Implement sticky ad bottom type ad on amp-ad --- .../global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - .../amp-analytics/0.1/analytics-root.js | 4 ++-- .../0.1/test/test-analytics-root.js | 22 ++++++++++--------- .../amp-analytics/0.1/test/test-events.js | 5 ++--- tools/experiments/experiments-config.js | 6 ----- 6 files changed, 16 insertions(+), 23 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index 592363ba372a..ec1c70afef2f 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -8,7 +8,6 @@ "dfp-render-on-idle-cwv-exp": 1, "flexAdSlots": 0.05, "ios-fixed-no-transfer": 1, - "visibility-trigger-improvements": 1, "ads-initialIntersection": 1, "amp-cid-backup": 1, "sticky-ad-transition": 0.1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 5b868da17b74..04140b8d1a19 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -7,7 +7,6 @@ "doubleclickSraReportExcludedBlock": 0.1, "flexAdSlots": 0.05, "ios-fixed-no-transfer": 0, - "visibility-trigger-improvements": 1, "layout-aspect-ratio-css": 0, "sticky-ad-transition": 0.02, "disable-a4a-non-sd": 1, diff --git a/extensions/amp-analytics/0.1/analytics-root.js b/extensions/amp-analytics/0.1/analytics-root.js index 9a0e1d14f30f..9411537ce195 100644 --- a/extensions/amp-analytics/0.1/analytics-root.js +++ b/extensions/amp-analytics/0.1/analytics-root.js @@ -25,7 +25,6 @@ import { import {dev, user, userAssert} from '../../../src/log'; import {getMode} from '../../../src/mode'; import {isArray} from '../../../src/types'; -import {isExperimentOn} from '../../../src/experiments'; import {layoutRectLtwh} from '../../../src/layout-rect'; import {map} from '../../../src/utils/object'; import {provideVisibilityManager} from './visibility-manager'; @@ -342,7 +341,8 @@ export class AnalyticsRoot { */ getElements(context, selectors, selectionMethod) { if ( - isExperimentOn(this.ampdoc.win, 'visibility-trigger-improvements') && + /* isExperimentOn(this.ampdoc.win, 'visibility-trigger-improvements') // launched: true */ + true && isArray(selectors) ) { userAssert( diff --git a/extensions/amp-analytics/0.1/test/test-analytics-root.js b/extensions/amp-analytics/0.1/test/test-analytics-root.js index a00cae7953e3..82dc0dfefb63 100644 --- a/extensions/amp-analytics/0.1/test/test-analytics-root.js +++ b/extensions/amp-analytics/0.1/test/test-analytics-root.js @@ -23,7 +23,6 @@ import { VisibilityManagerForDoc, VisibilityManagerForEmbed, } from '../visibility-manager'; -import {toggleExperiment} from '../../../../src/experiments'; import {user} from '../../../../src/log'; describes.realWin('AmpdocAnalyticsRoot', {amp: 1}, (env) => { @@ -339,11 +338,11 @@ describes.realWin('AmpdocAnalyticsRoot', {amp: 1}, (env) => { child.setAttribute('data-vars-id', 'child1'); child2.setAttribute('data-vars-id', 'child2'); child3.setAttribute('data-vars-id', 'child3'); - toggleExperiment(win, 'visibility-trigger-improvements', true); }); afterEach(() => { - toggleExperiment(win, 'visibility-trigger-improvements', false); + /* toggleExperiment(win, 'visibility-trigger-improvements', false) // launched: true */ + false; }); it('should find element and elements by selector', async () => { @@ -355,7 +354,8 @@ describes.realWin('AmpdocAnalyticsRoot', {amp: 1}, (env) => { child2, ]); // Check that non-experiment works - toggleExperiment(win, 'visibility-trigger-improvements', false); + /* toggleExperiment(win, 'visibility-trigger-improvements', false) // launched: true */ + false; expect( await root.getElements(body, '.notMyClass', null) ).to.deep.equal([child3]); @@ -421,7 +421,8 @@ describes.realWin('AmpdocAnalyticsRoot', {amp: 1}, (env) => { }); it('should find non AMP element with single selector', async () => { - toggleExperiment(win, 'visibility-trigger-improvements', false); + /* toggleExperiment(win, 'visibility-trigger-improvements', false) // launched: true */ + false; child.classList.remove('i-amphtml-element'); child.removeAttribute('data-vars-id'); child.classList.add('myClass'); @@ -753,13 +754,12 @@ describes.realWin( child.setAttribute('data-vars-id', '123'); child2.setAttribute('data-vars-id', '456'); child3.setAttribute('data-vars-id', '789'); - - toggleExperiment(win, 'visibility-trigger-improvements', true); }); afterEach(() => { child.classList.add('i-amphtml-element'); - toggleExperiment(win, 'visibility-trigger-improvements', false); + /* toggleExperiment(win, 'visibility-trigger-improvements', false) // launched: true */ + false; }); it('should find all elements by selector', async () => { @@ -767,7 +767,8 @@ describes.realWin( expect(elements).to.deep.equals([child, child2]); // Check that non-experiment version works - toggleExperiment(win, 'visibility-trigger-improvements', false); + /* toggleExperiment(win, 'visibility-trigger-improvements', false) // launched: true */ + false; expect( await root.getElements(body, '.notMyClass', null) ).to.deep.equals([child3]); @@ -829,7 +830,8 @@ describes.realWin( }); it('should find non AMP element with single selector', async () => { - toggleExperiment(win, 'visibility-trigger-improvements', false); + /* toggleExperiment(win, 'visibility-trigger-improvements', false) // launched: true */ + false; child.classList.remove('i-amphtml-element'); expect(await root.getElements(body, '.myClass', null)).to.deep.equal([ child, diff --git a/extensions/amp-analytics/0.1/test/test-events.js b/extensions/amp-analytics/0.1/test/test-events.js index 1c7d87bf8063..d38d55ec0cde 100644 --- a/extensions/amp-analytics/0.1/test/test-events.js +++ b/extensions/amp-analytics/0.1/test/test-events.js @@ -32,7 +32,6 @@ import {AmpdocAnalyticsRoot} from '../analytics-root'; import {Deferred} from '../../../../src/utils/promise'; import {Signals} from '../../../../src/utils/signals'; import {macroTask} from '../../../../testing/yield'; -import {toggleExperiment} from '../../../../src/experiments'; describes.realWin('Events', {amp: 1}, (env) => { let win; @@ -2001,7 +2000,6 @@ describes.realWin('Events', {amp: 1}, (env) => { let target2; beforeEach(() => { - toggleExperiment(win, 'visibility-trigger-improvements', true); readyPromise = Promise.resolve(); unlisten = env.sandbox.spy(); unlisten2 = env.sandbox.spy(); @@ -2045,7 +2043,8 @@ describes.realWin('Events', {amp: 1}, (env) => { }); } - toggleExperiment(win, 'visibility-trigger-improvements', false); + /* toggleExperiment(win, 'visibility-trigger-improvements', false) // launched: true */ + false; }); it('should fire event per selector', async () => { diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index 1d83e864fd57..0f231be2cb42 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -159,12 +159,6 @@ export const EXPERIMENTS = [ spec: 'https://github.com/ampproject/amphtml/issues/20595', cleanupIssue: 'https://github.com/ampproject/amphtml/issues/26709', }, - { - id: 'visibility-trigger-improvements', - name: 'AMP Analytics Visibility Trigger Improvements', - spec: 'https://github.com/ampproject/amphtml/issues/26823', - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/26823', - }, { id: 'a4a-no-signing', name: 'Remove signing requirement for AMPHTML ads', From 49042181decaee34f66812c5907f0271e1539d9d Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:43 +0000 Subject: [PATCH 5/9] (2021-03-05, 77127c7be) `disable-a4a-non-sd`: 1 Previous history on prod-config.json: - 77127c7be - 2021-03-05T09:36:06-08:00 - Turn on backupCid experiment in prod --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - extensions/amp-a4a/0.1/amp-a4a.js | 5 +++-- extensions/amp-a4a/0.1/test/test-amp-a4a.js | 8 ++------ 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index ec1c70afef2f..b8d3007d6b77 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -14,7 +14,6 @@ "layout-aspect-ratio-css": 1, "tcf-post-message-proxy-api": 1, "amp-consent-granular-consent": 1, - "disable-a4a-non-sd": 1, "3p-vendor-split": 0.1, "story-ad-placements": 1 } diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 04140b8d1a19..f1179e6066c2 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -9,7 +9,6 @@ "ios-fixed-no-transfer": 0, "layout-aspect-ratio-css": 0, "sticky-ad-transition": 0.02, - "disable-a4a-non-sd": 1, "tcf-post-message-proxy-api": 1, "amp-consent-granular-consent": 1, "amp-cid-backup": 1, diff --git a/extensions/amp-a4a/0.1/amp-a4a.js b/extensions/amp-a4a/0.1/amp-a4a.js index c44524c0bdac..70d7d478e28c 100644 --- a/extensions/amp-a4a/0.1/amp-a4a.js +++ b/extensions/amp-a4a/0.1/amp-a4a.js @@ -56,7 +56,7 @@ import { getConsentPolicyState, } from '../../../src/consent'; import {getContextMetadata} from '../../../src/iframe-attributes'; -import {getExperimentBranch, isExperimentOn} from '../../../src/experiments'; +import {getExperimentBranch} from '../../../src/experiments'; import {getExtensionsFromMetadata} from './amp-ad-utils'; import {getMode} from '../../../src/mode'; import {insertAnalyticsElement} from '../../../src/extension-analytics'; @@ -2586,7 +2586,8 @@ export function isPlatformSupported(win) { // Require Shadow DOM support for a4a. if ( !isNative(win.Element.prototype.attachShadow) && - isExperimentOn(win, 'disable-a4a-non-sd') + /* isExperimentOn(win, 'disable-a4a-non-sd') // launched: true */ + true ) { return false; } diff --git a/extensions/amp-a4a/0.1/test/test-amp-a4a.js b/extensions/amp-a4a/0.1/test/test-amp-a4a.js index 2426ec86ec2e..00eb59512694 100644 --- a/extensions/amp-a4a/0.1/test/test-amp-a4a.js +++ b/extensions/amp-a4a/0.1/test/test-amp-a4a.js @@ -61,7 +61,6 @@ import {layoutRectLtwh, layoutSizeFromRect} from '../../../../src/layout-rect'; import {macroTask} from '../../../../testing/yield'; import {resetScheduledElementForTesting} from '../../../../src/service/custom-element-registry'; import {data as testFragments} from './testdata/test_fragments'; -import {toggleExperiment} from '../../../../src/experiments'; import {data as validCSSAmp} from './testdata/valid_css_at_rules_amp.reserialized'; describes.realWin('amp-a4a: no signing', {amp: true}, (env) => { @@ -254,7 +253,6 @@ describes.realWin('amp-a4a: no signing', {amp: true}, (env) => { }); it('should fallback when shadow DOM is not supported', async () => { - toggleExperiment(env.win, 'disable-a4a-non-sd', true, true); attachShadowStub.value(undefined); const fallbackSpy = env.sandbox.spy(a4a, 'handleFallback_'); env.sandbox.stub(a4a, 'skipClientSideValidation').returns(false); @@ -265,7 +263,6 @@ describes.realWin('amp-a4a: no signing', {amp: true}, (env) => { }); it('should fallback when shadow DOM is polyfilled', async () => { - toggleExperiment(env.win, 'disable-a4a-non-sd', true, true); attachShadowStub.value(function () { // A non-native function. return null; @@ -279,7 +276,8 @@ describes.realWin('amp-a4a: no signing', {amp: true}, (env) => { }); it('should ignore shadow DOM requirement without an experiment', async () => { - toggleExperiment(env.win, 'disable-a4a-non-sd', false, true); + /* toggleExperiment(env.win, 'disable-a4a-non-sd', false, true) // launched: true */ + false; attachShadowStub.value(undefined); const fallbackSpy = env.sandbox.spy(a4a, 'handleFallback_'); env.sandbox.stub(a4a, 'skipClientSideValidation').returns(false); @@ -1587,7 +1585,6 @@ describes.realWin('amp-a4a', {amp: true}, (env) => { // Remove attachShadow. attachShadowStub.value(undefined); - toggleExperiment(fixture.win, 'disable-a4a-non-sd', true, true); fetchMock.getOnce( TEST_URL + '&__amp_source_origin=about%3Asrcdoc', @@ -1634,7 +1631,6 @@ describes.realWin('amp-a4a', {amp: true}, (env) => { attachShadowStub.value(function () { return null; }); - toggleExperiment(fixture.win, 'disable-a4a-non-sd', true, true); fetchMock.getOnce( TEST_URL + '&__amp_source_origin=about%3Asrcdoc', From ed59d3ab8f0c29f2abc4752bc44cc375a07cd072 Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:46 +0000 Subject: [PATCH 6/9] (2021-03-12, 1b7583d5d) `tcf-post-message-proxy-api`: 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous history on prod-config.json: - 1b7583d5d - 2021-03-12T07:22:55-08:00 - 🧪 [amp-consent] Turn on TCF PostMessage Proxy API Experiment --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - extensions/amp-consent/0.1/amp-consent.js | 6 ++++-- extensions/amp-consent/0.1/test/test-amp-consent.js | 7 +++---- tools/experiments/experiments-config.js | 5 ----- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index b8d3007d6b77..e863a356cb4a 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -12,7 +12,6 @@ "amp-cid-backup": 1, "sticky-ad-transition": 0.1, "layout-aspect-ratio-css": 1, - "tcf-post-message-proxy-api": 1, "amp-consent-granular-consent": 1, "3p-vendor-split": 0.1, "story-ad-placements": 1 diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index f1179e6066c2..54e537a20e71 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -9,7 +9,6 @@ "ios-fixed-no-transfer": 0, "layout-aspect-ratio-css": 0, "sticky-ad-transition": 0.02, - "tcf-post-message-proxy-api": 1, "amp-consent-granular-consent": 1, "amp-cid-backup": 1, "3p-vendor-split": 0.01, diff --git a/extensions/amp-consent/0.1/amp-consent.js b/extensions/amp-consent/0.1/amp-consent.js index 20fd4a739b31..1194a23a67a5 100644 --- a/extensions/amp-consent/0.1/amp-consent.js +++ b/extensions/amp-consent/0.1/amp-consent.js @@ -122,10 +122,12 @@ export class AmpConsent extends AMP.BaseElement { this.matchedGeoGroup_ = null; /** @private {?boolean} */ - this.isTcfPostMessageProxyExperimentOn_ = isExperimentOn( + this.isTcfPostMessageProxyExperimentOn_ = + /* isExperimentOn( this.win, 'tcf-post-message-proxy-api' - ); + ) // launched: true */ + true; /** @private {?boolean} */ this.isGranularConsentExperimentOn_ = isExperimentOn( diff --git a/extensions/amp-consent/0.1/test/test-amp-consent.js b/extensions/amp-consent/0.1/test/test-amp-consent.js index c15b817ee46d..8b1eccce5757 100644 --- a/extensions/amp-consent/0.1/test/test-amp-consent.js +++ b/extensions/amp-consent/0.1/test/test-amp-consent.js @@ -996,12 +996,11 @@ describes.realWin( let ampConsent; let consentElement; - beforeEach(() => { - toggleExperiment(win, 'tcf-post-message-proxy-api', true); - }); + beforeEach(() => {}); afterEach(() => { - toggleExperiment(win, 'tcf-post-message-proxy-api', false); + /* toggleExperiment(win, 'tcf-post-message-proxy-api', false) // launched: true */ + false; }); describe('config', () => { diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index 0f231be2cb42..dfd885491c33 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -180,11 +180,6 @@ export const EXPERIMENTS = [ name: 'Responsive layouts implemented via aspect-ratio CSS', spec: 'https://github.com/ampproject/amphtml/issues/30291', }, - { - id: 'tcf-post-message-proxy-api', - name: 'Proxy for TCF PostMessageAPI to send TCData to 3p iframes', - spec: 'https://github.com/ampproject/amphtml/issues/30385', - }, { id: 'dfp-render-on-idle-cwv-exp', name: 'To measure the CWV impact of ads idle rendering', From 4e96a2492fca767cd66ee35729fe0e91bb1e25d9 Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:50 +0000 Subject: [PATCH 7/9] (2021-03-17, db781bd6c) `amp-consent-granular-consent`: 1 Previous history on prod-config.json: - db781bd6c - 2021-03-17T09:35:48-07:00 - turnOnGranularConsent --- .../global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - extensions/amp-consent/0.1/amp-consent.js | 7 ++++--- extensions/amp-consent/0.1/consent-ui.js | 7 ++++--- .../amp-consent/0.1/test/test-amp-consent.js | 21 +++++++++---------- .../amp-consent/0.1/test/test-consent-ui.js | 5 ++--- src/custom-element.js | 7 ++++--- test/unit/test-custom-element.js | 8 +++---- tools/experiments/experiments-config.js | 5 ----- 9 files changed, 27 insertions(+), 35 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index e863a356cb4a..75f9a161537f 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -12,7 +12,6 @@ "amp-cid-backup": 1, "sticky-ad-transition": 0.1, "layout-aspect-ratio-css": 1, - "amp-consent-granular-consent": 1, "3p-vendor-split": 0.1, "story-ad-placements": 1 } diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 54e537a20e71..9639731760c6 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -9,7 +9,6 @@ "ios-fixed-no-transfer": 0, "layout-aspect-ratio-css": 0, "sticky-ad-transition": 0.02, - "amp-consent-granular-consent": 1, "amp-cid-backup": 1, "3p-vendor-split": 0.01, "story-ad-placements": 0.01 diff --git a/extensions/amp-consent/0.1/amp-consent.js b/extensions/amp-consent/0.1/amp-consent.js index 1194a23a67a5..7a5d9e81b9ab 100644 --- a/extensions/amp-consent/0.1/amp-consent.js +++ b/extensions/amp-consent/0.1/amp-consent.js @@ -50,7 +50,6 @@ import {dict, hasOwn} from '../../../src/utils/object'; import {getData} from '../../../src/event-helper'; import {getServicePromiseForDoc} from '../../../src/service'; import {isArray, isEnumValue, isObject} from '../../../src/types'; -import {isExperimentOn} from '../../../src/experiments'; import {toggle} from '../../../src/style'; const CONSENT_STATE_MANAGER = 'consentStateManager'; @@ -130,10 +129,12 @@ export class AmpConsent extends AMP.BaseElement { true; /** @private {?boolean} */ - this.isGranularConsentExperimentOn_ = isExperimentOn( + this.isGranularConsentExperimentOn_ = + /* isExperimentOn( this.win, 'amp-consent-granular-consent' - ); + ) // launched: true */ + true; /** @private {?Promise} */ this.purposeConsentRequired_ = this.isGranularConsentExperimentOn_ diff --git a/extensions/amp-consent/0.1/consent-ui.js b/extensions/amp-consent/0.1/consent-ui.js index 60fc7d7795b9..326e5d8c64c0 100644 --- a/extensions/amp-consent/0.1/consent-ui.js +++ b/extensions/amp-consent/0.1/consent-ui.js @@ -32,7 +32,6 @@ import {getConsentStateValue} from './consent-info'; import {getData} from '../../../src/event-helper'; import {getServicePromiseForDoc} from '../../../src/service'; import {htmlFor} from '../../../src/static-template'; -import {isExperimentOn} from '../../../src/experiments'; import {setImportantStyles, setStyles, toggle} from '../../../src/style'; const TAG = 'amp-consent-ui'; @@ -183,10 +182,12 @@ export class ConsentUI { /** @private {?Promise} */ this.promptUISrcPromise_ = null; - this.isGranularConsentExperimentOn_ = isExperimentOn( + this.isGranularConsentExperimentOn_ = + /* isExperimentOn( this.win_, 'amp-consent-granular-consent' - ); + ) // launched: true */ + true; this.init_(config, opt_postPromptUI); } diff --git a/extensions/amp-consent/0.1/test/test-amp-consent.js b/extensions/amp-consent/0.1/test/test-amp-consent.js index 8b1eccce5757..e62daa3dc03c 100644 --- a/extensions/amp-consent/0.1/test/test-amp-consent.js +++ b/extensions/amp-consent/0.1/test/test-amp-consent.js @@ -35,7 +35,6 @@ import { resetServiceForTesting, } from '../../../../src/service'; import {removeSearch} from '../../../../src/url'; -import {toggleExperiment} from '../../../../src/experiments'; import {xhrServiceForTesting} from '../../../../src/service/xhr-impl'; describes.realWin( @@ -512,7 +511,6 @@ describes.realWin( }); it('updates local storage and uses those values (granular consent on)', async () => { - toggleExperiment(win, 'amp-consent-granular-consent', true); const inlineConfig = { 'consentInstanceId': 'abc', 'consentRequired': 'remote', @@ -544,7 +542,8 @@ describes.realWin( 'xyz': PURPOSE_CONSENT_STATE.REJECTED, }, }); - toggleExperiment(win, 'amp-consent-granular-consent', false); + /* toggleExperiment(win, 'amp-consent-granular-consent', false) // launched: true */ + false; }); it('accepts unknown as a response', async () => { @@ -651,7 +650,6 @@ describes.realWin( }); it('syncs purposeConsents from server', async () => { - toggleExperiment(win, 'amp-consent-granular-consent', true); const inlineConfig = { 'consentInstanceId': 'abc', 'consentRequired': true, @@ -686,7 +684,8 @@ describes.realWin( {'xyz': PURPOSE_CONSENT_STATE.REJECTED} ) ); - toggleExperiment(win, 'amp-consent-granular-consent', false); + /* toggleExperiment(win, 'amp-consent-granular-consent', false) // launched: true */ + false; }); it('syncs metadata from server', async () => { @@ -762,7 +761,6 @@ describes.realWin( }); it('should validate purpose consents before syncing', async () => { - toggleExperiment(win, 'amp-consent-granular-consent', true); const inlineConfig = { 'consentInstanceId': 'abc', 'consentRequired': true, @@ -777,7 +775,8 @@ describes.realWin( await macroTask(); expect(validationSpy).to.be.calledOnce; expect(validationSpy).to.be.calledWith({'xyz': false}); - toggleExperiment(win, 'amp-consent-granular-consent', false); + /* toggleExperiment(win, 'amp-consent-granular-consent', false) // launched: true */ + false; }); it('should not sync data if response is null', async () => { @@ -1221,11 +1220,11 @@ describes.realWin( 'purpose-bar': false, }, }; - toggleExperiment(win, 'amp-consent-granular-consent', true); }); afterEach(() => { - toggleExperiment(win, 'amp-consent-granular-consent', false); + /* toggleExperiment(win, 'amp-consent-granular-consent', false) // launched: true */ + false; }); it('handles purposeConsentMap w/ accept', () => { @@ -1568,7 +1567,6 @@ describes.realWin( let consentElement; beforeEach(() => { - toggleExperiment(win, 'amp-consent-granular-consent', true); jsonMockResponses = { 'https://server-test-1/': '{"consentRequired": true, "purposeConsentRequired": ["abc", "bcd"]}', @@ -1582,7 +1580,8 @@ describes.realWin( }); afterEach(() => { - toggleExperiment(win, 'amp-consent-granular-consent', false); + /* toggleExperiment(win, 'amp-consent-granular-consent', false) // launched: true */ + false; }); describe('purposeConsentRequired', () => { diff --git a/extensions/amp-consent/0.1/test/test-consent-ui.js b/extensions/amp-consent/0.1/test/test-consent-ui.js index bcb3ec2779ac..2143d7ddc699 100644 --- a/extensions/amp-consent/0.1/test/test-consent-ui.js +++ b/extensions/amp-consent/0.1/test/test-consent-ui.js @@ -31,7 +31,6 @@ import { registerServiceBuilder, resetServiceForTesting, } from '../../../../src/service'; -import {toggleExperiment} from '../../../../src/experiments'; import {user} from '../../../../src/log'; import {whenCalled} from '../../../../testing/test-helper.js'; @@ -377,7 +376,6 @@ describes.realWin( // TODO(micajuineho): consolidate w/ test above after exp done it('should pass purpose consents to the iframe', async () => { - toggleExperiment(win, 'amp-consent-granular-consent', true); const config = dict({ 'promptUISrc': 'https://promptUISrc', 'clientConfig': { @@ -405,7 +403,8 @@ describes.realWin( 'purposeConsents': {'abc': 1}, }) ); - toggleExperiment(win, 'amp-consent-granular-consent', false); + /* toggleExperiment(win, 'amp-consent-granular-consent', false) // launched: true */ + false; }); it('should pass the promptTrigger reason to the iframe', function* () { diff --git a/src/custom-element.js b/src/custom-element.js index 797376946daa..52cbdfa1d614 100644 --- a/src/custom-element.js +++ b/src/custom-element.js @@ -41,7 +41,6 @@ import {dev, devAssert, rethrowAsync, user, userAssert} from './log'; import {getIntersectionChangeEntry} from './utils/intersection-observer-3p-host'; import {getMode} from './mode'; import {getSchedulerForDoc} from './service/scheduler'; -import {isExperimentOn} from './experiments'; import {setStyle} from './style'; import {shouldBlockOnConsentByMeta} from './consent'; import {startupChunk} from './chunk'; @@ -499,10 +498,12 @@ function createBaseCustomElementClass(win, elementConnectedCallback) { // Wait for consent. const consentPromise = implPromise.then(() => { const policyId = this.getConsentPolicy_(); - const isGranularConsentExperimentOn = isExperimentOn( + const isGranularConsentExperimentOn = + /* isExperimentOn( win, 'amp-consent-granular-consent' - ); + ) // launched: true */ + true; const purposeConsents = isGranularConsentExperimentOn && !policyId ? this.getPurposesConsent_() diff --git a/test/unit/test-custom-element.js b/test/unit/test-custom-element.js index 0de94fd31303..1a2040ae46d3 100644 --- a/test/unit/test-custom-element.js +++ b/test/unit/test-custom-element.js @@ -28,7 +28,6 @@ import { getImplSyncForTesting, } from '../../src/custom-element'; import {elementConnectedCallback} from '../../src/service/custom-element-registry'; -import {toggleExperiment} from '../../src/experiments'; describes.realWin('CustomElement', {amp: true}, (env) => { // TODO(dvoytenko, #11827): Make this test work on Safari. @@ -706,12 +705,11 @@ describes.realWin('CustomElement', {amp: true}, (env) => { }); describe('granular consent experiment', () => { - beforeEach(() => { - toggleExperiment(win, 'amp-consent-granular-consent', true); - }); + beforeEach(() => {}); afterEach(() => { - toggleExperiment(win, 'amp-consent-granular-consent', false); + /* toggleExperiment(win, 'amp-consent-granular-consent', false) // launched: true */ + false; }); it('should find the correct purposes', () => { diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index dfd885491c33..129777c1f5f5 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -185,11 +185,6 @@ export const EXPERIMENTS = [ name: 'To measure the CWV impact of ads idle rendering', spec: 'https://github.com/ampproject/amphtml/issues/31436', }, - { - id: 'amp-consent-granular-consent', - name: 'Client-side granular consent', - spec: 'https://github.com/ampproject/amphtml/issues/31607', - }, { id: 'amp-story-page-attachment-ui-v2', name: 'New UI for all new page attachments in stories format', From b168307fa13ab9b382b76bf8ad0f6bd6d4b81554 Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:52 +0000 Subject: [PATCH 8/9] (2021-03-23, 1115f6ca9) `amp-cid-backup`: 1 Previous history on prod-config.json: - 1115f6ca9 - 2021-03-23T03:46:29+08:00 - Ramp up 3p-vendor-split experiment --- build-system/global-configs/canary-config.json | 1 - build-system/global-configs/prod-config.json | 1 - src/service/cid-impl.js | 5 +++-- tools/experiments/experiments-config.js | 6 ------ 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index 75f9a161537f..9b0636a165e4 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -9,7 +9,6 @@ "flexAdSlots": 0.05, "ios-fixed-no-transfer": 1, "ads-initialIntersection": 1, - "amp-cid-backup": 1, "sticky-ad-transition": 0.1, "layout-aspect-ratio-css": 1, "3p-vendor-split": 0.1, diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index 9639731760c6..d09839893692 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -9,7 +9,6 @@ "ios-fixed-no-transfer": 0, "layout-aspect-ratio-css": 0, "sticky-ad-transition": 0.02, - "amp-cid-backup": 1, "3p-vendor-split": 0.01, "story-ad-placements": 0.01 } diff --git a/src/service/cid-impl.js b/src/service/cid-impl.js index d349f4b65805..a57736c729c4 100644 --- a/src/service/cid-impl.js +++ b/src/service/cid-impl.js @@ -33,7 +33,6 @@ import {getCookie, setCookie} from '../cookies'; import {getCryptoRandomBytesArray} from '../utils/bytes'; import {getServiceForDoc, registerServiceBuilderForDoc} from '../service'; import {getSourceOrigin, isProxyOrigin, parseUrlDeprecated} from '../url'; -import {isExperimentOn} from '../../src/experiments'; import {isIframed} from '../dom'; import {parseJson, tryParseJson} from '../json'; import {tryResolve} from '../utils/promise'; @@ -181,7 +180,9 @@ class Cid { this.apiKeyMap_ = null; /** @const {boolean} */ - this.isBackupCidExpOn = isExperimentOn(this.ampdoc.win, 'amp-cid-backup'); + this.isBackupCidExpOn = + /* isExperimentOn(this.ampdoc.win, 'amp-cid-backup') // launched: true */ + true; } /** @override */ diff --git a/tools/experiments/experiments-config.js b/tools/experiments/experiments-config.js index 129777c1f5f5..79d29d75e7ae 100644 --- a/tools/experiments/experiments-config.js +++ b/tools/experiments/experiments-config.js @@ -169,12 +169,6 @@ export const EXPERIMENTS = [ name: 'Move ads placement into layoutCallback', spec: 'https://github.com/ampproject/amphtml/issues/27068', }, - { - id: 'amp-cid-backup', - name: 'Backup AMP-generated CIDs to Storage.', - spec: 'https://github.com/ampproject/amphtml/issues/29484', - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/29484', - }, { id: 'layout-aspect-ratio-css', name: 'Responsive layouts implemented via aspect-ratio CSS', From ec1db3ee968f37d157733970c6f2f902b142ff59 Mon Sep 17 00:00:00 2001 From: mohammed-ibra Date: Wed, 1 Jan 2025 01:26:52 +0000 Subject: [PATCH 9/9] =?UTF-8?q?=F0=9F=9A=AE=20Sweep=20experiments=20older?= =?UTF-8?q?=20than=202024-01-01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sweep experiments last flipped globally up to 2024-01-01: - (2021-01-20, a9e277820) `adsense-ad-size-optimization`: 1 - (2020-11-19, cac02489d) `amp-accordion-display-locking`: 1 - (2020-08-14, 77ced1de0) `expand-json-targeting`: 1 - (2021-01-27, b73878986) `visibility-trigger-improvements`: 1 - (2021-03-05, 77127c7be) `disable-a4a-non-sd`: 1 - (2021-03-12, 1b7583d5d) `tcf-post-message-proxy-api`: 1 - (2021-03-17, db781bd6c) `amp-consent-granular-consent`: 1 - (2021-03-23, 1115f6ca9) `amp-cid-backup`: 1 --- ### Cleanup issues Close these once they've been addressed and this PR has been merged: - [ ] `adsense-ad-size-optimization`: #24165 - [ ] `visibility-trigger-improvements`: #26823 - [ ] `amp-cid-backup`: #29484 --- ### ⚠️ Javascript source files require intervention The following may contain errors and/or require intervention to remove superfluous conditionals: - [ ] `extensions/amp-a4a/0.1/amp-a4a.js` - [ ] `extensions/amp-a4a/0.1/test/test-amp-a4a.js` - [ ] `extensions/amp-accordion/0.1/amp-accordion.js` - [ ] `extensions/amp-accordion/0.1/test/test-amp-accordion.js` - [ ] `extensions/amp-accordion/1.0/amp-accordion.js` - [ ] `extensions/amp-accordion/1.0/test/test-amp-accordion.js` - [ ] `extensions/amp-analytics/0.1/analytics-root.js` - [ ] `extensions/amp-analytics/0.1/test/test-analytics-root.js` - [ ] `extensions/amp-analytics/0.1/test/test-events.js` - [ ] `extensions/amp-consent/0.1/amp-consent.js` - [ ] `extensions/amp-consent/0.1/consent-ui.js` - [ ] `extensions/amp-consent/0.1/test/test-amp-consent.js` - [ ] `extensions/amp-consent/0.1/test/test-consent-ui.js` - [ ] `src/custom-element.js` - [ ] `src/service/cid-impl.js` - [ ] `test/unit/test-custom-element.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/accordion.amp.html` - [ ] `examples/amp-consent/amp-consent-3p-postmessage.html` - [ ] `test/manual/amp-analytics/amp-analytics-multi-selector.html` - [ ] `test/manual/amp-consent/amp-consent-granular-consent.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)