From 7ff3a9d4862ea7a424b7e836e0f603a93d3006c1 Mon Sep 17 00:00:00 2001 From: jxdeveloper1 <71084096+jxdeveloper1@users.noreply.github.com> Date: Sat, 31 Jul 2021 06:18:07 +0800 Subject: [PATCH] =?UTF-8?q?new=20ad=20network=20jixie=20=E2=9C=A8=20New=20?= =?UTF-8?q?feature=20(#35128)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added the jixie 3p * changed to do a universal ad * clean up and simplification * delete a file added by accident * adding the client id scope and cookie name for jixie ad network * Update jixie.md * Update jixie.js * corrected some style problems e.g. relative path usage etc * removed a space which caused linting failures * fixing 2 other linting concerns : unused variable and space char --- 3p/integration.js | 2 ++ 3p/vendors/jixie.js | 27 ++++++++++++++++++++++ ads/_config.js | 7 ++++++ ads/vendors/jixie.js | 26 +++++++++++++++++++++ ads/vendors/jixie.md | 45 ++++++++++++++++++++++++++++++++++++ examples/amp-ad/ads.amp.html | 8 +++++++ extensions/amp-ad/amp-ad.md | 1 + 7 files changed, 116 insertions(+) create mode 100644 3p/vendors/jixie.js create mode 100644 ads/vendors/jixie.js create mode 100644 ads/vendors/jixie.md diff --git a/3p/integration.js b/3p/integration.js index 633cd9b0c31f..93463c59985e 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -161,6 +161,7 @@ import {insticator} from '#ads/vendors/insticator'; import {invibes} from '#ads/vendors/invibes'; import {iprom} from '#ads/vendors/iprom'; import {ix} from '#ads/vendors/ix'; +import {jixie} from '#ads/vendors/jixie'; import {jubna} from '#ads/vendors/jubna'; import {kargo} from '#ads/vendors/kargo'; import {ketshwa} from '#ads/vendors/ketshwa'; @@ -445,6 +446,7 @@ register('insticator', insticator); register('invibes', invibes); register('iprom', iprom); register('ix', ix); +register('jixie', jixie); register('jubna', jubna); register('kargo', kargo); register('ketshwa', ketshwa); diff --git a/3p/vendors/jixie.js b/3p/vendors/jixie.js new file mode 100644 index 000000000000..dad64e63344f --- /dev/null +++ b/3p/vendors/jixie.js @@ -0,0 +1,27 @@ +/** + * Copyright 2021 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. + */ + +// src/polyfills.js must be the first import. +import '#3p/polyfills'; + +import {draw3p, init} from '#3p/integration-lib'; +import {register} from '#3p/3p'; + +import {jixie} from '#ads/vendors/jixie'; +init(window); +register('jixie', jixie); + +window.draw3p = draw3p; diff --git a/ads/_config.js b/ads/_config.js index f60c11b127f9..143fd5a50252 100755 --- a/ads/_config.js +++ b/ads/_config.js @@ -645,6 +645,13 @@ const adConfig = jsonConfiguration({ renderStartImplemented: true, }, + 'jixie': { + prefetch: ['https://scripts.jixie.io/jxamp.min.js'], + clientIdScope: '__jxamp', + clientIdCookieName: '_jx', + renderStartImplemented: true, + }, + 'kixer': { prefetch: 'https://cdn.kixer.com/ad/load.js', renderStartImplemented: true, diff --git a/ads/vendors/jixie.js b/ads/vendors/jixie.js new file mode 100644 index 000000000000..01c15dd2b807 --- /dev/null +++ b/ads/vendors/jixie.js @@ -0,0 +1,26 @@ +/** + * Copyright 2021 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 {loadScript} from '#3p/3p'; + +/** + * @param {!Window} global + */ +export function jixie(global) { + // For flexibility, all validations are performed in the + // Jixie side based on the data on the page for the amp-ad + loadScript(global, 'https://scripts.jixie.io/jxamp.min.js'); +} diff --git a/ads/vendors/jixie.md b/ads/vendors/jixie.md new file mode 100644 index 000000000000..5b8d1424005c --- /dev/null +++ b/ads/vendors/jixie.md @@ -0,0 +1,45 @@ + + +# JIXIE + +## Example of JIXIE AD implementation + +```html + + +``` + +## Configuration + +For details on the configuration semantics, please contact JIXIE + +### Required parameters + +- `data-unit`: ADUNIT_CODE (given by jixie to the publisher) + +### Optional parameters + +- `data-cid`: specific creative id +- `data-options`: stringified json object with miscellaenous info diff --git a/examples/amp-ad/ads.amp.html b/examples/amp-ad/ads.amp.html index c445d0aafe4a..316e5eacb4d0 100644 --- a/examples/amp-ad/ads.amp.html +++ b/examples/amp-ad/ads.amp.html @@ -262,6 +262,7 @@ + @@ -1296,6 +1297,13 @@

Invibes

data-custom-endpoint="https://k.r66net.com/GetAmpLink"> +

Jixie

+ + +

Jubna widget

diff --git a/extensions/amp-ad/amp-ad.md b/extensions/amp-ad/amp-ad.md index 59f12f59354c..31f52b24b935 100644 --- a/extensions/amp-ad/amp-ad.md +++ b/extensions/amp-ad/amp-ad.md @@ -363,6 +363,7 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati - [Innity](../../ads/vendors/innity.md) - [Invibes](../../ads/vendors/invibes.md) - [Iprom](../../ads/vendors/iprom.md) +- [Jixie](../../ads/vendors/jixie.md) - [Kargo](../../ads/vendors/kargo.md) - [Ketshwa](../../ads/vendors/ketshwa.md) - [Kiosked](../../ads/vendors/kiosked.md)