forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inabox.amp.html
60 lines (60 loc) · 2.45 KB
/
inabox.amp.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
48
49
50
51
52
53
54
55
56
57
58
59
60
<!doctype html>
<html ⚡4ads>
<head>
<meta charset="utf-8">
<link rel="canonical" href="http://nonblocking.io/" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/amp4ads-v0.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<style>
.left {
text-align: left;
}
.right {
text-align: right;
}
</style>
</head>
<body>
<div class="left">
<amp-img id="img-1" width="150" height="100"
src="https://lh3.googleusercontent.com/5rcQ32ml8E5ONp9f9-Rf78IofLb9QjS5_0mqsY1zEFc=w300-h50-no">
</amp-img>
</div>
<div class="right">
<a href="https://google.com" target="_blank">
<amp-img id="img-2" width="150" height="100"
src="https://lh3.googleusercontent.com/5rcQ32ml8E5ONp9f9-Rf78IofLb9QjS5_0mqsY1zEFc=w300-h80-no">
</amp-img>
</a>
</div>
<amp-analytics>
<script type="application/json">
{
"transport": {"beacon": false, "xhrpost": false},
"requests": {
"visibility": "/ping?${type}&${elementY}"
},
"triggers": {
"pageVisible": {
"on": "visible",
"request": "visibility",
"vars": { "type": "pageVisible" }
},
"imgVisible": {
"on": "visible",
"request": "visibility",
"visibilitySpec": {
"selector": "#img-2",
"selectionMethod": "scope",
"visiblePercentageMin": 10
},
"vars": { "type": "imgVisible" }
}
}
}
</script>
</amp-analytics>
</body>
</html>