diff --git a/extensions/amp-auto-ads/0.1/attributes.js b/extensions/amp-auto-ads/0.1/attributes.js index 9727c7cbd656..377a00c271d2 100644 --- a/extensions/amp-auto-ads/0.1/attributes.js +++ b/extensions/amp-auto-ads/0.1/attributes.js @@ -15,6 +15,7 @@ const NON_DATA_ATTRIBUTE_ALLOWLIST = { 'height': true, 'width': true, 'sticky': true, + 'json': true, }; /** diff --git a/extensions/amp-auto-ads/0.1/premiumads-network-config.js b/extensions/amp-auto-ads/0.1/premiumads-network-config.js index a352da4a54d1..0cbae33d1b2a 100644 --- a/extensions/amp-auto-ads/0.1/premiumads-network-config.js +++ b/extensions/amp-auto-ads/0.1/premiumads-network-config.js @@ -31,7 +31,11 @@ export class PremiumadsNetworkConfig { getConfigUrl() { const data = this.autoAmpAdsElement_.dataset; const host = data.host || 'https://tags.premiumads.com.br'; - return buildUrl(`${host}/autoads/${data.publisher}`, {}, 4096); + return buildUrl( + `${host}/autoads/${data.publisher}`, + data.json ? {'json': data.json} : {}, + 4096 + ); } /** @override */ @@ -49,7 +53,7 @@ export class PremiumadsNetworkConfig { 'layout': data.layout || Layout_Enum.FIXED, 'style': data['style'] || - 'margin: 15px auto; position: relative !important; display: block !important;', + 'margin: 0 auto; position: relative !important; display: block !important;', }; } diff --git a/extensions/amp-auto-ads/0.1/test/test-premiumads-network-config.js b/extensions/amp-auto-ads/0.1/test/test-premiumads-network-config.js index c4901074e39a..eaeb8a5908a6 100644 --- a/extensions/amp-auto-ads/0.1/test/test-premiumads-network-config.js +++ b/extensions/amp-auto-ads/0.1/test/test-premiumads-network-config.js @@ -76,7 +76,7 @@ describes.realWin( 'json': '', 'layout': Layout_Enum.FIXED, 'style': - 'margin: 15px auto; position: relative !important; display: block !important;', + 'margin: 0 auto; position: relative !important; display: block !important;', }); });