-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (55 loc) · 1.65 KB
/
Copy pathindex.html
File metadata and controls
55 lines (55 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="rgb(106, 0, 128)" />
<script src="ads/kaiads.v3.min.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => {
window.isKaiAdLoad = true;
window.loadKaiAd = (container, callback) => {
if (container) {
getKaiAd({
publisher: 'YOUR_PUBLISHER_ID',
app: 'kaios app',
slot: 'yourSlotName',
h: 60,
w: 230,
container: document.getElementById(container),
onerror: err => console.log('Ad error: ', err),
onready: ad => {
window.ads = ad;
ad.call('display', {
tabindex: 0,
navClass: 'items',
display: 'block',
})
ad.on('display', callback);
ad.on('click', () => console.log('click event') )
}
});
} else {
getKaiAd({
publisher: 'YOUR_PUBLISHER_ID',
app: 'kaios app',
slot: 'yourSlotName',
onerror: err => console.log('Ad error: ', err),
onready: ad => {
ad.call('display')
ad.on('click', () => console.log('click event'))
}
});
}
}
});
</script>
<title>React App</title>
</head>
<body>
<div id="root"></div>
</body>
</html>