Skip to content

Commit

Permalink
LOND-3031 fixing conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rochapablo committed Jun 5, 2024
2 parents 7d608f5 + 88ad7c3 commit 0048f4f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
6 changes: 3 additions & 3 deletions examples/refresh.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<style amp-custom>
.artificialfold {
height: 1000px;
width: 300px
width: 300px;
background: #000;
}
</style>
Expand All @@ -21,6 +21,6 @@
<h1>AMP Static Image DFP Reservation.</h1>
<p>Tests a static image ad in an AMP page.</p>
<div class="artificialfold"></div>
<amp-ad data-slot="/701/wpni.amp.opinions/blog/plum-line" height=250 layout=fixed type=doubleclick width=300></amp-ad>
<amp-ad data-slot="/701/wpni.amp.opinions/blog/plum-line" height=250 layout=fixed type=doubleclick width=300></amp-ad>
<amp-ad data-slot="/701/wpni.amp.opinions/blog/plum-line" height=250 layout=fixed type=doubleclick width=300 json='{"onRefresh":{"key1": "value1"}}'></amp-ad>
<amp-ad data-slot="/701/wpni.amp.opinions/blog/plum-line" height=250 layout=fixed type=doubleclick width=300 json='{"onRefresh":{"key1": "value1"}}'></amp-ad>
</body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,22 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
this.win,
this.element.parentElement
);

const targeting =
(this.jsonTargeting && this.jsonTargeting['targeting']) || null;

const onRefresh =
(this.isRefreshing &&
this.jsonTargeting &&
this.jsonTargeting['onRefresh']) ||
null;

const scp = serializeTargeting(
{...targeting, ...onRefresh},
(this.jsonTargeting && this.jsonTargeting['categoryExclusions']) || null,
null
);

const {fwSignal, parentWidth, slotWidth} = this.flexibleAdSlotData_;
// If slotWidth is -1, that means its width must be determined by its
// parent container, and so should have the same value as parentWidth.
Expand Down Expand Up @@ -723,12 +739,7 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
'msz': msz,
'psz': psz,
'fws': fws,
'scp': serializeTargeting(
(this.jsonTargeting && this.jsonTargeting['targeting']) || null,
(this.jsonTargeting && this.jsonTargeting['categoryExclusions']) ||
null,
null
),
'scp': scp,
'spsa': this.isSinglePageStoryAd
? `${pageLayoutBox.width}x${pageLayoutBox.height}`
: null,
Expand Down
10 changes: 5 additions & 5 deletions extensions/amp-auto-ads/0.1/premiumads-network-config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {buildUrl} from '#ads/google/a4a/shared/url-builder';
import { buildUrl } from '#ads/google/a4a/shared/url-builder';

import {Layout_Enum} from '#core/dom/layout';
import { Layout_Enum } from '#core/dom/layout';

import {Services} from '#service';
import { Services } from '#service';

/**
* @implements {./ad-network-config.AdNetworkConfigDef}
Expand Down Expand Up @@ -65,8 +65,8 @@ export class PremiumadsNetworkConfig {
return {
initialMinSpacing: viewportHeight,
subsequentMinSpacing: [
{adCount: 3, spacing: viewportHeight * 2},
{adCount: 6, spacing: viewportHeight * 3},
{ adCount: 3, spacing: viewportHeight * 2 },
{ adCount: 6, spacing: viewportHeight * 3 },
],
maxAdCount: 8,
};
Expand Down

0 comments on commit 0048f4f

Please sign in to comment.