Pop-under
Script: https://koin-ad.click/pop-under/v1/main.js
Element: <x-popunder>
Global object: popunder
Shared methods are in the Ad tag API. Pop-under adds show(), and it has no creative of its own.
Install
show() creates a transparent layer over the page and returns that element. It returns null if the script did not register the element name.
html
<script>
function onKoinPop() {
popunder.show();
}
</script>
<script
async
src="https://koin-ad.click/pop-under/v1/main.js?id=UNIT_ID"
onload="onKoinPop()"
></script>You can also place the element yourself. It still covers the viewport.
html
<script
async
src="https://koin-ad.click/pop-under/v1/main.js?id=UNIT_ID"
></script>
<x-popunder></x-popunder>show()
js
const layer = popunder.show();The layer is fixed to the viewport, transparent, and clickable. It does not render an image or a title. A click follows the matched ad and then removes the layer.
If no ad comes back, the element is removed.
theme() names
| Name | Selects |
|---|---|
pop-under | The <x-popunder> element |
js
popunder.theme(`
pop-under {
background: rgb(0 0 0 / 1%);
}
`);There are no inner parts. Keep the layer transparent enough that the page underneath stays visible.