Skip to content
This repository was archived by the owner on May 31, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ import {smi2} from '../ads/smi2';
import {sogouad} from '../ads/sogouad';
import {sortable} from '../ads/sortable';
import {sovrn} from '../ads/sovrn';
import {spotim} from '../ads/spotim';
import {spotx} from '../ads/spotx';
import {sunmedia} from '../ads/sunmedia';
import {swoop} from '../ads/swoop';
Expand Down Expand Up @@ -277,6 +278,7 @@ const AMP_EMBED_ALLOWED = {
pubexchange: true,
smartclip: true,
smi2: true,
spotim: true,
taboola: true,
zen: true,
zergnet: true,
Expand Down Expand Up @@ -449,6 +451,7 @@ register('smi2', smi2);
register('sogouad', sogouad);
register('sortable', sortable);
register('sovrn', sovrn);
register('spotim', spotim);
register('spotx', spotx);
register('sunmedia', sunmedia);
register('swoop', swoop);
Expand Down
6 changes: 6 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,12 @@ export const adConfig = {
prefetch: 'https://ap.lijit.com/www/sovrn_amp/sovrn_ads.js',
},

'spotim': {
preconnect: [
'https://recirculation.spot.im',
],
},

'spotx': {
preconnect: 'https://js.spotx.tv',
renderStartImplemented: true,
Expand Down
12 changes: 12 additions & 0 deletions ads/spotim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

import {loadScript, validateData} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function spotim(global, data) {
validateData(data, ['spotId', 'postId']);
loadScript(global, 'https://recirculation.spot.im/amp-ad-launcher/');
global.__SPOTIM_AMP__ = {spotId: data.spotId, postId: data.postId};
}
37 changes: 37 additions & 0 deletions ads/spotim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!---
Copyright 2018 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.
-->

# Spot.IM

## Example

```html
<amp-embed width="100" height="275"
type="spotim"
data-spot-id="publisher-id"
data-post-id="article-id"
layout="responsive">
</amp-embed>
```

## Configuration

For configuration details, please contact Spot.IM's Account Management Team.

### Required parameters

- `data-spot-id`: Publisher Id Provided by Account Management Team.
- `data-post-id`: Article Id
9 changes: 9 additions & 0 deletions examples/ads.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
<option>sortable</option>
<option>sovrn</option>
<option>spotx</option>
<option>spotim</option>
<option>sunmedia</option>
<option>swoop</option>
<option>taboola</option>
Expand Down Expand Up @@ -1661,6 +1662,14 @@ <h2>SOVRN</h2>
data-z="393900"><!-- this ID is only whitelisted for localhost:8000 and http://amphtml-nightly.herokuapp.com-->
</amp-ad>

<h2>Spot.IM widget</h2>
<amp-embed width="100" height="275"
type="spotim"
data-spot-id="sp_6phY2k0C"
data-post-id="443446"
layout="responsive">
</amp-embed>

<h2>SpotX</h2>
<amp-ad width="300" height="250"
type="spotx"
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 @@ -376,6 +376,7 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/
- [Postquare](../../ads/postquare.md)
- [PubExchange](../../ads/pubexchange.md)
- [Smi2](../../ads/smi2.md)
- [Spot.IM](../../ads/spotim.md)
- [Taboola](../../ads/taboola.md)
- [Zen](../../ads/zen.md)
- [ZergNet](../../ads/zergnet.md)