Skip to content

Commit

Permalink
feat: add Pubfuture to vendor list (#38500)
Browse files Browse the repository at this point in the history
Co-authored-by: graydy-hamilton <115214614+graydy-hamilton@users.noreply.github.com>
  • Loading branch information
leo-vu and grady-hamilton committed Oct 21, 2022
1 parent fa00339 commit 07d99f8
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 3p/vendors/pubfuture.js
@@ -0,0 +1,12 @@
// src/polyfills.js must be the first import.
import '#3p/polyfills';

import {register} from '#3p/3p';
import {draw3p, init} from '#3p/integration-lib';

import {pubfuture} from '#ads/vendors/pubfuture';

init(window);
register('pubfuture', pubfuture);

window.draw3p = draw3p;
4 changes: 4 additions & 0 deletions ads/_config.js
Expand Up @@ -1012,6 +1012,10 @@ const adConfig = jsonConfiguration({

'pubexchange': {},

'pubfuture': {
renderStartImplemented: true,
},

'pubguru': {
renderStartImplemented: true,
},
Expand Down
15 changes: 15 additions & 0 deletions ads/vendors/pubfuture.js
@@ -0,0 +1,15 @@
import {validateData, writeScript} from '#3p/3p';

const requiredParams = ['id'];

/**
* @param {!Window} global
* @param {!Object} data
*/
export function pubfuture(global, data) {
validateData(data, requiredParams);
writeScript(global, 'https://cdn.pubfuture-ad.com/amp/js/pt.js');
global.document.write(
'<script>pubfuturetag.display("' + data.id + '")</script>'
);
}
22 changes: 22 additions & 0 deletions ads/vendors/pubfuture.md
@@ -0,0 +1,22 @@
# Pubfuture

## Examples

```html
<amp-ad
width="300"
height="250"
type="pubfuture"
data-id="PLACE_HOLDER">
</amp-ad>
```

## Configuration

**Required:**

`width` + `height` - Required for all `<amp-ad>` units. Specifies the ad size.

`type` - Always set to "pubfuture".

`data-id`: Tag Id.
5 changes: 5 additions & 0 deletions examples/amp-ad/ads.amp.html
Expand Up @@ -346,6 +346,7 @@
<option>pressboard</option>
<option>promoteiq</option>
<option>pubexchange</option>
<option>pubfuture</option>
<option>pubmine</option>
<option>pulse</option>
<option>pulsepoint</option>
Expand Down Expand Up @@ -1733,6 +1734,10 @@ <h2>PubExchange</h2>
data-module-num="2626" data-test="true">
</amp-embed>

<h2>Pubfuture</h2>
<amp-ad width="300" height="250" type="pubfuture" data-id="PLACE_HOLDER">
</amp-ad>

<h2>PubGuru</h2>
<amp-ad width=300 height=250 type="pubguru" data-publisher="your-publisher-name"
data-slot="/23081961/monetizemore.com_test_300x250">
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Expand Up @@ -423,6 +423,7 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati
- [PPStudio](../../ads/vendors/ppstudio.md)
- [Pressboard](../../ads/vendors/pressboard.md)
- [PromoteIQ](../../ads/vendors/promoteiq.md)
- [Pubfuture](../../ads/vendors/pubfuture.md)
- [PubGuru](../../ads/vendors/pubguru.md)
- [PubMatic](../../ads/vendors/pubmatic.md)
- [Pubmine](../../ads/vendors/pubmine.md)
Expand Down

0 comments on commit 07d99f8

Please sign in to comment.