-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
47 lines (42 loc) · 1.35 KB
/
example.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example</title>
<script>
var _sasDummy = {
debug: true,
formats: {
1: 'https://dummyimage.com/50x50/555555/ffffff&text=Format+1',
2: 'https://dummyimage.com/50x50/555555/ffffff&text=Format+2',
3: 'https://dummyimage.com/50x50/555555/ffffff&text=Format+3',
}
}
</script>
<script src="/dist/smart.js" async></script>
<script>
var sas = sas || {};
sas.cmd = sas.cmd || [];
sas.cmd.push(function() {
sas.setup({ networkid: 666, domain: 'https://example.org', async: true });
});
sas.cmd.push(function() {
sas.call('onecall', { siteId: 1, pageId: 1, formatId: '1,2,3,4', target: 'keywords'});
});
</script>
</head>
<body>
<!-- prerendered (one call) ad -->
<div id="sas_1"></div>
<script>sas.cmd.push(function(){ sas.render('1'); });</script>
<!-- std call -->
<div id="sas_2"></div>
<script>sas.cmd.push(function(){ sas.call('std', { formatId: 2 }); });</script>
<!-- invalid container -->
<div id="sas_3x"></div>
<script>sas.cmd.push(function(){ sas.render('3'); });</script>
<!-- unknown format -->
<div id="sas_666"></div>
<script>sas.cmd.push(function(){ sas.render('666'); });</script>
</body>
</html>