Skip to content

Page push ​

Script: https://koin-ad.click/page-push/v1/main.js

Element: <x-push>

Global object: push

Shared methods are in the Ad tag API. Page push adds show(options) and four attributes.

Install ​

Call show() when you want the card. It returns the element, or null if the script did not register the element name.

html
<script>
  function onKoinPush() {
    push.show({
      displayTime: 8000,
      position: 'bottom-left',
    });
  }
</script>
<script
  async
  src="https://koin-ad.click/page-push/v1/main.js?id=UNIT_ID"
  onload="onKoinPush()"
></script>

Use one script tag. Do not load the file twice.

You can also place the element yourself:

html
<x-push display-time="8000" position="bottom-left"></x-push>

show(options) ​

Every field is optional.

FieldAttributeDefaultMeaning
displayTimedisplay-time5000How long the card stays, in milliseconds, before it closes itself
animationTimeanimation-time300Enter and leave animation, in milliseconds
defaultClosedefault-closetrueClose when displayTime ends
positionpositionbottom-rightCorner on the screen

displayTime and animationTime must be zero or a positive number. Anything else uses the default.

default-close accepts true, false, 1 and 0.

position is one of top-left, top-right, bottom-left, bottom-right. Any other value becomes bottom-right.

js
const card = push.show({
  displayTime: 0,
  defaultClose: false,
  animationTime: 200,
  position: 'top-right',
});

displayTime: 0 or defaultClose: false leaves the card up until the visitor closes it, or until you call push.close().

The visitor's close plays the leave animation, then removes the element. push.close() removes it immediately.

theme() names ​

NameSelects
pushThe <x-push> element
cardThe card
coverThe image
bodyThe text block
titleThe title
subtitleThe description
promptThe action line
micro-labelThe small label
badge-iconThe badge
svg-iconThe icon

The card is position: fixed, 380px wide, and inset 16px from the chosen corner. push is the selector for that outer box.

Traffic, monetized. · User guide for the Koin ad network