diff --git a/3p/integration.js b/3p/integration.js index 05463a3e7c11..3b2555fde31c 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -132,6 +132,7 @@ import {dotandads} from '../ads/dotandads'; import {dynad} from '../ads/dynad'; import {eadv} from '../ads/eadv'; import {eas} from '../ads/eas'; +import {empower} from '../ads/empower'; import {engageya} from '../ads/engageya'; import {epeex} from '../ads/epeex'; import {eplanning} from '../ads/eplanning'; @@ -407,6 +408,7 @@ register('dynad', dynad); register('eadv', eadv); register('eas', eas); register('embedly', embedly); +register('empower', empower); register('engageya', engageya); register('epeex', epeex); register('eplanning', eplanning); diff --git a/ads/_config.js b/ads/_config.js index 01a41e6e492d..4664ae7633c9 100755 --- a/ads/_config.js +++ b/ads/_config.js @@ -422,6 +422,11 @@ const adConfig = jsonConfiguration({ renderStartImplemented: true, }, + 'empower': { + prefetch: 'https://cdn.empower.net/sdk/amp-ad.min.js', + renderStartImplemented: true, + }, + 'engageya': {}, 'epeex': {}, diff --git a/ads/ads.extern.js b/ads/ads.extern.js index 33ab6210bcc0..5cf534c26569 100644 --- a/ads/ads.extern.js +++ b/ads/ads.extern.js @@ -377,6 +377,11 @@ data.zone; // distroscale.js data.tid; +// empower.js +data.category; +data.site; +data.zone; + // eplanning.js data.epl_si; data.epl_isv; diff --git a/ads/empower.js b/ads/empower.js new file mode 100644 index 000000000000..6e4ef2d04971 --- /dev/null +++ b/ads/empower.js @@ -0,0 +1,31 @@ +/** + * Copyright 2019 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 {validateData, writeScript} from '../3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function empower(global, data) { + validateData(data, ['site', 'zone'], ['category']); + global.category = data.category || 'general'; + global.site = data.site + ':general'; + global.zone = data.zone; + global.iwidth = data.width; + global.iheight = data.height; + writeScript(global, 'https://cdn.empower.net/sdk/amp-ad.min.js'); +} diff --git a/ads/empower.md b/ads/empower.md new file mode 100644 index 000000000000..ea4fde5dce3d --- /dev/null +++ b/ads/empower.md @@ -0,0 +1,43 @@ + + +# Empower + +## Example + +```html + +
+
+
+``` + + +## Configuration + +For details on the configuration semantics, please contact the ad network or refer to their documentation. + +### Required parameters + +* `data-site`: Site identifier provided by Empower. +* `data-zone`: Zone ID of the ad space. + +### Optional parameters + +* `data-category`: Category identifier provided by Empower. diff --git a/examples/ads.amp.html b/examples/ads.amp.html index 305001aeff95..429c60f7b036 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -141,6 +141,7 @@ + @@ -1107,6 +1108,13 @@

eADV

data-u="l0o0c0a8l%3Ahtos"> +

Empower

+ + +

Engageya widget

distroscale + @@ -682,6 +683,13 @@

E-Planning 320x50

data-epl_e="AMP_TEST"> +

Empower

+ + +

Ezoic

distroscale | | +| | | | @@ -683,6 +684,13 @@ PASS | data-epl_e="AMP_TEST"> | | +|

Empower

+| +| +| |

Ezoic

|