Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Pubfuture to vendor list (#38500)
Co-authored-by: graydy-hamilton <115214614+graydy-hamilton@users.noreply.github.com>
- Loading branch information
1 parent
fa00339
commit 07d99f8
Showing
6 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>' | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters