Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add myua to vendors list * fix year and cleaning * remove copyright notices * fix linter errors
- Loading branch information
Showing
7 changed files
with
74 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
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 {myua} from '#ads/vendors/myua'; | ||
|
||
init(window); | ||
register('myua', myua); | ||
|
||
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,21 @@ | ||
import {validateData} from '#3p/3p'; | ||
|
||
/** | ||
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function myua(global, data) { | ||
validateData(data, ['sid', 'iid'], ['demo', 'options']); | ||
|
||
const informerTag = global.document.createElement('div'); | ||
informerTag.setAttribute('data-top-iid', data.iid); | ||
global.document.body.appendChild(informerTag); | ||
|
||
const demoSuffix = data.demo ? 'dev.' : ''; | ||
const scriptTag = global.document.createElement('script'); | ||
scriptTag.src = `https://amp.top-js-metrics.top.${demoSuffix}my.ua/script.js`; | ||
scriptTag.setAttribute('async', 'true'); | ||
scriptTag.setAttribute('data-top-sid', data.sid); | ||
|
||
global.document.body.appendChild(scriptTag); | ||
} |
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,30 @@ | ||
# MYUA | ||
|
||
## Example | ||
|
||
### Basic | ||
|
||
```html | ||
<amp-embed | ||
width="300" | ||
height="400" | ||
type="myua" | ||
data-sid="1" | ||
data-iid="1" | ||
> | ||
</amp-embed> | ||
``` | ||
|
||
## Configuration | ||
|
||
For details on the configuration semantics, please contact the ad network or refer to their documentation. | ||
|
||
### Required parameters | ||
|
||
- `data-sid` | ||
- `data-iid` | ||
|
||
### Optional parameters | ||
|
||
- `data-demo` | ||
- `data-options` |
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