Skip to content

Commit 2f89d65

Browse files
AdSense/Doubleclick Launch Adx/Ady Rounding (ampproject#29737)
* Launch AdSense/Doubleclick Round Positions Experiment * linter fixes
1 parent 57fa3f7 commit 2f89d65

File tree

4 files changed

+26
-19
lines changed

4 files changed

+26
-19
lines changed

build-system/global-configs/canary-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
"amp-ad-no-center-css": 0,
3838
"sticky-ad-padding-bottom": 1,
3939
"analytics-chunks": 1,
40-
"ad-adsense-gam-round-params": 0.2,
40+
"ad-adsense-gam-round-params": 0.1,
4141
"render-on-idle-fix": 1
4242
}

build-system/global-configs/prod-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
"analytics-chunks": 1,
3939
"sticky-ad-padding-bottom": 1,
4040
"render-on-idle-fix": 1,
41-
"ad-adsense-gam-round-params": 0.2
41+
"ad-adsense-gam-round-params": 0.1
4242
}

extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ const ADSENSE_BASE_URL = 'https://googleads.g.doubleclick.net/pagead/ads';
7070
const TAG = 'amp-ad-network-adsense-impl';
7171

7272
/** @const @enum {string} */
73-
const ROUND_LOCATION_PARAMS_EXP = {
73+
const ROUND_LOCATION_PARAMS_HOLDBACK_EXP = {
7474
ID: 'ad-adsense-gam-round-params',
75-
CONTROL: '21066726',
76-
EXPERIMENT: '21066727',
75+
CONTROL: '21067039',
76+
EXPERIMENT: '21067040',
7777
};
7878

7979
/**
@@ -253,11 +253,11 @@ export class AmpAdNetworkAdsenseImpl extends AmpA4A {
253253
],
254254
},
255255
{
256-
experimentId: ROUND_LOCATION_PARAMS_EXP.ID,
256+
experimentId: ROUND_LOCATION_PARAMS_HOLDBACK_EXP.ID,
257257
isTrafficEligible: () => true,
258258
branches: [
259-
ROUND_LOCATION_PARAMS_EXP.CONTROL,
260-
ROUND_LOCATION_PARAMS_EXP.EXPERIMENT,
259+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.CONTROL,
260+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.EXPERIMENT,
261261
],
262262
},
263263
]).concat(AMPDOC_FIE_EXPERIMENT_INFO_LIST);
@@ -424,7 +424,10 @@ export class AmpAdNetworkAdsenseImpl extends AmpA4A {
424424
'pucrd': identity.pucrd || null,
425425
...parameters,
426426
},
427-
isInExperiment(this.element, ROUND_LOCATION_PARAMS_EXP.EXPERIMENT),
427+
!isInExperiment(
428+
this.element,
429+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.EXPERIMENT
430+
),
428431
experimentIds
429432
);
430433
});

extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ export const EXPAND_JSON_TARGETING_EXP = {
160160
};
161161

162162
/** @const @enum {string} */
163-
const ROUND_LOCATION_PARAMS_EXP = {
163+
const ROUND_LOCATION_PARAMS_HOLDBACK_EXP = {
164164
ID: 'ad-adsense-gam-round-params',
165-
CONTROL: '21066728',
166-
EXPERIMENT: '21066729',
165+
CONTROL: '21067041',
166+
EXPERIMENT: '21067042',
167167
};
168168

169169
/**
@@ -479,11 +479,11 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
479479
],
480480
},
481481
{
482-
experimentId: ROUND_LOCATION_PARAMS_EXP.ID,
482+
experimentId: ROUND_LOCATION_PARAMS_HOLDBACK_EXP.ID,
483483
isTrafficEligible: () => true,
484484
branches: [
485-
ROUND_LOCATION_PARAMS_EXP.CONTROL,
486-
ROUND_LOCATION_PARAMS_EXP.EXPERIMENT,
485+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.CONTROL,
486+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.EXPERIMENT,
487487
],
488488
},
489489
]).concat(AMPDOC_FIE_EXPERIMENT_INFO_LIST);
@@ -682,7 +682,9 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
682682
: null,
683683
...googleBlockParameters(
684684
this,
685-
this.experimentIds.includes(ROUND_LOCATION_PARAMS_EXP.EXPERIMENT)
685+
!this.experimentIds.includes(
686+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.EXPERIMENT
687+
)
686688
),
687689
};
688690
}
@@ -797,7 +799,9 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
797799
this.getPageParameters(consentTuple, /* instances= */ undefined),
798800
rtcParams
799801
),
800-
this.experimentIds.includes(ROUND_LOCATION_PARAMS_EXP.EXPERIMENT),
802+
!this.experimentIds.includes(
803+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.EXPERIMENT
804+
),
801805
this.experimentIds
802806
).then((adUrl) => this.getAdUrlDeferred.resolve(adUrl));
803807
});
@@ -2013,8 +2017,8 @@ function constructSRARequest_(a4a, instances) {
20132017
googlePageParameters(
20142018
a4a,
20152019
startTime,
2016-
instances[0].experimentIds.includes(
2017-
ROUND_LOCATION_PARAMS_EXP.EXPERIMENT
2020+
!instances[0].experimentIds.includes(
2021+
ROUND_LOCATION_PARAMS_HOLDBACK_EXP.EXPERIMENT
20182022
)
20192023
)
20202024
)

0 commit comments

Comments
 (0)