Skip to content

Commit

Permalink
Add support fro AccessTrade to amp-ad (#4703)
Browse files Browse the repository at this point in the history
* AccessTrade amp-ad support

* Update Copyright

* Update Copyright
  • Loading branch information
interspacejp authored and lannka committed Aug 25, 2016
1 parent c006238 commit 32d1994
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3p/integration.js
Expand Up @@ -37,6 +37,7 @@ import {twitter} from './twitter';

// 3P Ad Networks - please keep in alphabetic order
import {a9} from '../ads/a9';
import {accesstrade} from '../ads/accesstrade';
import {adblade, industrybrains} from '../ads/adblade';
import {adform} from '../ads/adform';
import {adgeneration} from '../ads/adgeneration';
Expand Down Expand Up @@ -114,6 +115,7 @@ const IS_DEV = true;

// Keep the list in alphabetic order
register('a9', a9);
register('accesstrade', accesstrade);
register('adblade', adblade);
register('adform', adform);
register('adgeneration', adgeneration);
Expand Down
1 change: 1 addition & 0 deletions ads/_config.js
Expand Up @@ -24,6 +24,7 @@
export const adPrefetch = {
// Keep the list in alphabetic order
a9: 'https://c.amazon-adsystem.com/aax2/assoc.js',
accesstrade: 'https://h.accesstrade.net/js/amp/amp.js',
adblade: 'https://web.adblade.com/js/ads/async/show.js',
adgeneration: 'https://i.socdm.com/sdk/js/adg-script-loader.js',
// TODO: Remove this once we switch over to the direct request version of adsense.js.
Expand Down
27 changes: 27 additions & 0 deletions ads/accesstrade.js
@@ -0,0 +1,27 @@
/**
* 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, validateData} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function accesstrade(global, data) {
validateData(data, ['atops', 'atrotid']);
global.atParams = data;
writeScript(global, 'https://h.accesstrade.net/js/amp/amp.js');
}
37 changes: 37 additions & 0 deletions ads/accesstrade.md
@@ -0,0 +1,37 @@
<!---
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.
-->

# AccessTrade

## Example

```html
<amp-ad width="300" height="250"
type="accesstrade"
data-atops="r"
data-atrotid="00000000000008c06y">
</amp-ad>
```

## Configuration

For configuration details and to generate your tags, please contact https://member.accesstrade.net/atv3/contact.html

Supported parameters:

- data-atops
- data-atrotid

1 change: 1 addition & 0 deletions builtins/amp-ad.md
Expand Up @@ -72,6 +72,7 @@ resources in AMP. It requires a `type` argument that select what ad network is d
## Supported ad networks

- [A9](../ads/a9.md)
- [AccessTrade](../ads/accesstrade.md)
- [Adblade](../ads/adblade.md)
- [ADITION](../ads/adition.md)
- [Adform](../ads/adform.md)
Expand Down
8 changes: 8 additions & 0 deletions examples/ads.amp.html
Expand Up @@ -53,6 +53,7 @@ <h2>Ad networks in <span class="broken">red color</span> have broken examples, p
2) keep the list in alphabetic order
-->
<a href="#a9">A9</a> |
<a href="#accesstrade">AccessTrade</a> |
<a href="#adblade">Adblade</a> |
<a href="#adition">ADITION</a> |
<a href="#adgeneration">Ad Generation</a> |
Expand Down Expand Up @@ -129,6 +130,13 @@ <h2 id="a9">A9</h2>
data-aax_src="302">
</amp-ad>

<h2 id="accesstrade">AccessTrade</h2>
<amp-ad width="300" height="250"
type="accesstrade"
data-atops="r"
data-atrotid="00000000000008c06y">
</amp-ad>

<h2 id="adblade">Adblade</h2>
<amp-ad width=300 height=250
type="adblade"
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Expand Up @@ -72,6 +72,7 @@ resources in AMP. It requires a `type` argument that select what ad network is d
## Supported ad networks

- [A9](../../ads/a9.md)
- [AccessTrade](../../ads/accesstrade.md)
- [Adblade](../../ads/adblade.md)
- [ADITION](../../ads/adition.md)
- [Adform](../../ads/adform.md)
Expand Down

0 comments on commit 32d1994

Please sign in to comment.