forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpt.host.html
70 lines (66 loc) · 2.31 KB
/
gpt.host.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
61
62
63
64
65
66
67
68
69
70
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script async="async" src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
</script>
<title>AMP inabox for GPT demo</title>
</head>
<body>
<h1>AMP inabox for GPT demo</h1>
<h2>Standard GPT Ad</h2>
<h4><i>served in an iframe from /examples/amphtml-ads/adchoices-1.a4a.html</i></h4>
<div id="div-gpt-ad-1533830709700-0" style="height:300px; width:600px;" data-google-query-id="CMDAi-P-6N0CFUuJwAoddusOag">
<iframe id="google_ads_iframe_/49790152/scaledplacement/300x300_0"
title="3rd party ad content"
name="google_ads_iframe_/49790152/scaledplacement/300x300_0"
width="300"
height="300"
scrolling="no"
marginwidth="0"
marginheight="0"
frameborder="0"
src="/examples/amphtml-ads/adchoices-1.a4a.html"
style="border: 0px; vertical-align: bottom;"
data-load-complete="true">
</iframe>
</div>
<h4><i>served in an iframe from /examples/amphtml-ads/adchoices-2.a4a.html</i></h4>
<div id="div-gpt-ad-1533830709700-0" data-google-query-id="CMDAi-P-6N0CFUuJwAoddusOag">
<iframe id="google_ads_iframe_/49790152/scaledplacement/300x300_0"
title="3rd party ad content"
name="google_ads_iframe_/47947404/d-billboard_0"
width="970"
height="250"
scrolling="no"
marginwidth="0"
marginheight="0"
frameborder="0"
src="/examples/amphtml-ads/adchoices-2.a4a.html"
style="border: 0px; vertical-align: bottom;"
data-load-complete="true">
</iframe>
</div>
<h2>Scroll down to see a GPT slot that tries to request that same AMP ad</h2>
<script>
googletag.cmd.push(function() {
googletag
.defineSlot("/30497360/cfuertes/amp/inabox_300_200", [300, 200], "div-gpt-ad-12345")
.addService(googletag.pubads());
googletag.enableServices();
});
</script>
<div style="height: 120vh"></div>
<div id="div-gpt-ad-12345" style="width:300px;height:200px">
<script>
googletag.cmd.push(function() {
googletag.display("div-gpt-ad-12345");
});
</script>
</div>
<div style="height: 120vh"></div>
</body>
</html>