Skip to content

Commit

Permalink
AMP integration with Index Exchange (ampproject#5944)
Browse files Browse the repository at this point in the history
* Add amp-ad support for Index Exchange

* fix alphabetical sorting of new ix config

* Updated alphabetical order using ix in ads.amp.html and corrected the year of copyright in ix.js.

* Add Index Exchange to amp-ad.md file
  • Loading branch information
Index Exchange authored and Vanessa Pasque committed Dec 22, 2016
1 parent 720108e commit 151a36f
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import {ibillboard} from '../ads/ibillboard';
import {imobile} from '../ads/imobile';
import {improvedigital} from '../ads/improvedigital';
import {inmobi} from '../ads/inmobi';
import {ix} from '../ads/ix';
import {kargo} from '../ads/kargo';
import {kixer} from '../ads/kixer';
import {ligatus} from '../ads/ligatus';
Expand Down Expand Up @@ -190,6 +191,7 @@ register('imobile', imobile);
register('improvedigital', improvedigital);
register('industrybrains', industrybrains);
register('inmobi', inmobi);
register('ix', ix);
register('kargo', kargo);
register('kixer', kixer);
register('ligatus', ligatus);
Expand Down
5 changes: 5 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ export const adConfig = {
renderStartImplemented: true,
},

ix: {
prefetch: 'https://js-sec.indexww.com/indexJTag.js',
preconnect: 'https://as-sec.casalemedia.com',
},

kargo: {},

kixer: {
Expand Down
26 changes: 26 additions & 0 deletions ads/ix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright 2016 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 {writeScript} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function ix(global, data) {
global.CasaleArgs = data;
writeScript(global, 'https://js-sec.indexww.com/indexJTag.js');
}
53 changes: 53 additions & 0 deletions ads/ix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!---
Copyright 2016 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.
-->

# Index Exchange


## Example ad tag

```html
<amp-ad width=300 height=250
type="ix"
data-ad-units="4"
data-casale-i-d="1"
data-version="2"
</amp-ad>
```

## Configuration

For semantics of configuration, please contact your account manager at Index Exchange.

__Required:__

- `data-ad-units`
- `data-casale-i-d` or `data-app-i-d`
- `data-version`


__Optional:__

- `data-default-ad-unit`
- `data-floor`
- `data-floor-currency`
- `data-interstitial`
- `data-position-i-d`
- `data-pub-default`
- `data-pub-passback`
- `data-referrer`
- `data-ifa`

11 changes: 11 additions & 0 deletions examples/ads.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ <h2>Ad networks in <span class="broken">red color</span> have broken examples, p
<a href="#imobile">I-Mobile</a> |
<a href="#industrybrains">Industrybrains</a> |
<a href="#inmobi">InMobi</a> |
<a href="#ix">Index Exchange</a> |
<a href="#kargo">Kargo</a> |
<a href="#kixer">Kixer</a> |
<a href="#ligatus">Ligatus</a> |
Expand Down Expand Up @@ -702,6 +703,16 @@ <h2 id="inmobi">InMobi</h2>
<div fallback></div>
</amp-ad>

<h2 id="ix">Index Exchange 300x250 banner</h2>
<amp-ad width="300" height="250"
type="ix"
data-version="2"
data-ad-units="4"
data-casale-i-d="1">
<div placeholder></div>
<div fallback></div>
</amp-ad>

<h2 id="kargo">Kargo</h2>
<amp-ad width=300 height=250
type="kargo"
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ resources in AMP. It requires a `type` argument that select what ad network is d
- [I-Mobile](../../ads/imobile.md)
- [iBillboard](../../ads/ibillboard.md)
- [Improve Digital](../../ads/improvedigital.md)
- [Index Exchange](../../ads/ix.md)
- [Industrybrains](../../ads/industrybrains.md)
- [InMobi](../../ads/inmobi.md)
- [Kargo](../../ads/kargo.md)
Expand Down

0 comments on commit 151a36f

Please sign in to comment.