Skip to content

Commit

Permalink
new ad network jixie ✨ New feature (#35128)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jxdeveloper1 committed Jul 30, 2021
1 parent 53d97f1 commit 7ff3a9d
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3p/integration.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down
27 changes: 27 additions & 0 deletions 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;
7 changes: 7 additions & 0 deletions ads/_config.js
Expand Up @@ -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,
Expand Down
26 changes: 26 additions & 0 deletions 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');
}
45 changes: 45 additions & 0 deletions ads/vendors/jixie.md
@@ -0,0 +1,45 @@
<!---
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.
-->

# JIXIE

## Example of JIXIE AD implementation

```html
<amp-ad
width="300"
height="250"
type="jixie"
layout="responsive"
data-unit="ADUNIT_CODE"
data-cid="800"
data-options='{"miscParams":{"reserve1":"test1","reserve2":"test2"}}'
>
</amp-ad>
```

## 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
8 changes: 8 additions & 0 deletions examples/amp-ad/ads.amp.html
Expand Up @@ -262,6 +262,7 @@
<option>insticator</option>
<option>invibes</option>
<option>ix</option>
<option>jixie</option>
<option>jubna</option>
<option>kargo</option>
<option>ketshwa</option>
Expand Down Expand Up @@ -1296,6 +1297,13 @@ <h2>Invibes</h2>
data-custom-endpoint="https://k.r66net.com/GetAmpLink">
</amp-ad>

<h2>Jixie</h2>
<amp-ad width="300" height="250" type="jixie" layout="responsive"
data-unit="jixietestunit"
data-cid="800"
data-options='{"miscParams":{"reserve1":"test1","reserve2":"test2"}}'>
</amp-ad>

<h2>Jubna widget</h2>
<amp-embed width="200" height="200" type="jubna" layout="responsive" data-wid="1078" data-pid="792">
</amp-embed>
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Expand Up @@ -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)
Expand Down

0 comments on commit 7ff3a9d

Please sign in to comment.