-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added skoiy ad network to amp-ad vendors (#38926)
- Loading branch information
Showing
6 changed files
with
67 additions
and
1 deletion.
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 {skoiy} from '#ads/vendors/skoiy'; | ||
|
||
init(window); | ||
register('skoiy', skoiy); | ||
|
||
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,17 @@ | ||
import {validateData, writeScript} from '#3p/3p'; | ||
|
||
/** | ||
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function skoiy(global, data) { | ||
// TODO: check mandatory fields | ||
validateData(data, ['token', 'format', 'id'], ['query']); | ||
|
||
const {format, id, query = '', token} = data; | ||
|
||
const options = query ? '&' + query : ''; | ||
|
||
const url = `https://svas.skoiy.xyz/${format}/${token}/${id}?amp${options}`; | ||
writeScript(global, url); | ||
} |
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,26 @@ | ||
![skoiy logo](https://skoiy.com/img/logos/logo-skoiy.svg) | ||
|
||
Skoiy is an integrated suite of platforms that simplify and centralize the management, distribution, and monetization of digital media across a suite of independent platforms that fit the needs of each project. | ||
|
||
## Example | ||
|
||
```html | ||
<amp-ad | ||
layout="fixed-height" | ||
height="454" | ||
type="skoiy" | ||
data-token="5nff7dqpce5u4moq" | ||
data-format="carousel" | ||
data-id="8462514974"> | ||
</amp-ad> | ||
``` | ||
|
||
### Required parameters | ||
|
||
- `data-token` | ||
- `data-format` | ||
- `data-id` | ||
|
||
### Optional parameters | ||
|
||
- `data-query` |
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