forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmp-vendors.amp.html
230 lines (208 loc) · 7.66 KB
/
cmp-vendors.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>AMP Consent CMP Vendors</title>
<link rel="canonical" href="cmp-vendors.amp.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-custom>
.box {
background: #ccc;
border: 1px solid #aaa;
padding: 10px;
margin: 10px;
}
#container {
position: absolute;
top: 10000px;
height: 10px;
}
.filterBar {
background: #eee;
padding: 3px;
font-size: 1.2em;
}
.filterBar form {
display: flex;
justify-content: flex-start;
align-items: center;
}
.filterBar form * {
margin-left: 10px;
margin-right 10px;
}
.filterBar .clearLocalStorage {
margin-left: auto;
}
select {
border: 1px solid #999;
}
input[type=submit] {
font-size: 14px;
border: 1px solid #999;
border-radius: 3px;
margin-left: 10px;
}
amp-consent {
min-height: 30px;
font-family: 'Roboto';
font-weight: 500;
line-height: 30px;
padding: 8px;
background: #46b6ac;
}
amp-consent button {
border: none;
border-radius: 2px;
color: #fafafa;
height: 26px;
min-width: 32px;
padding: 0 16px;
margin: 0 16px;
text-transform: uppercase;
letter-spacing: 0;
cursor: pointer;
vertical-align: middle;
line-height: 26px;
text-align: center;
background: #3f51b5;
}
</style>
<script async custom-element="amp-geo" src="https://cdn.ampproject.org/v0/amp-geo-0.1.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<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/v0.js"></script>
<script async custom-element="amp-consent" src="https://cdn.ampproject.org/v0/amp-consent-0.1.js"></script>
</head>
<body>
<div class="filterBar">
<form action="cmp-vendors.amp.html" method="get" target="_top">
<label for="filter">Vendor filter</label>
<select id="filter" name="type">
<option>[Select a vendor]</option>
<!-- This should be in alphabetical order. _ping_ should be the first -->
<option>_ping_</option>
<option>appconsent</option>
<option>didomi</option>
<option>Marfeel</option>
<option>SourcePoint</option>
</select>
<input type="submit" value="Go">
<button type="button" class="clearLocalStorage" onclick="localStorage.clear(); alert('localStorage Cleared!')">Clear localStorage</button>
</form>
</div>
<h1 id="top">AMP Consent CMP</h1>
<h3>Please open your devtools an enable the consent v2 experiment: `AMP.toggleExperiment('amp-consent-v2', true)`</h3>
<h3>Image that is blocked by both consent</h3>
<amp-img data-block-on-consent src="https://lh3.googleusercontent.com/pSECrJ82R7-AqeBCOEPGPM9iG9OEIQ_QXcbubWIOdkY=w300-h200-no-n" width=300 height=200></amp-img>
<h3>Image that is NOT blocked by consent</h3>
<amp-img src="https://lh3.googleusercontent.com/pSECrJ82R7-AqeBCOEPGPM9iG9OEIQ_QXcbubWIOdkY=w300-h200-no-n" width=300 height=200></amp-img>
<div id="container">
Container for amp-consent tags.
<!-- This should be in alphabetical order. _ping_ should be the first -->
<!-- _ping_ example -->
<amp-consent id='ABC' layout='nodisplay' type='_ping_'>
<script type="application/json">
{
"consents": {},
"postPromptUI": "postPromptUI",
"clientConfig": {
"CMP_id": "test_id",
"other_info": "test_info"
}
}
</script>
<div id="postPromptUI">
Post Prompt UI
<button on="tap:ABC.prompt(consent=_ping_)" role="button">Manage</button>
</div>
</amp-consent>
<!-- End _ping_ example -->
<!-- appconsent example -->
<amp-consent id='ABC' layout='nodisplay' type='appconsent'>
<script type="application/json">
{
"postPromptUI": "postPromptUI",
"clientConfig": {
"id": "1/10/v5eCA1JV4"
}
}
</script>
<div id="postPromptUI">
Post Prompt UI
<button on="tap:ABC.prompt(consent=appconsent)" role="button">Manage</button>
</div>
</amp-consent>
<!-- End appconsent example -->
<!-- didomi example -->
<amp-consent id='didomi' layout='nodisplay' type='didomi'>
<script type="application/json">
{
"consents": {},
"postPromptUI": "postPromptUI",
"clientConfig": {
"config": {
"app": {
"apiKey": "03f1af55-a479-4c1f-891a-7481345171ce",
"name": "AMP - Didomi",
"vendors": {
"iab": {
"all": true
}
}
}
}
}
}
</script>
<div id="postPromptUI">
Post Prompt UI
<button on="tap:didomi.prompt(consent=didomi)" role="button">Manage</button>
</div>
</amp-consent>
<!-- End didomi example -->
<!-- Marfeel example -->
<amp-consent id='marfeelConsent' layout='nodisplay' type='Marfeel'>
<script type="application/json">
{
"postPromptUI": "postPromptUI",
"clientConfig": {
"consentLanguage": "en",
"publisherLogo": "https://marfeel.mgr.consensu.org/amp/img/marfeel-logo.png"
}
}
</script>
<div id="postPromptUI">
Post Prompt UI
<button on="tap:marfeelConsent.prompt(consent=Marfeel)" role="button">Manage</button>
</div>
</amp-consent>
<!-- End Marfeel example -->
<!-- SourcePoint example -->
<amp-consent id='consent' layout='nodisplay' type='SourcePoint'>
<script type="application/json">
{
"postPromptUI": "my-consent-prompt-ui",
"clientConfig": {
"accountId": 22,
"siteName": "mobile.demo",
"siteId": 2372,
"privacyManagerId": "5c0e81b7d74b3c30c6852301",
"stageCampaign": false,
"authId": "MY-UUID",
"targetingParams": {
"MyPrivacyManager": "false"
}
}
}
</script>
<div id="my-consent-prompt-ui">
Post Prompt UI
<button on="tap:consent.prompt(consent=SourcePoint)" role="button">Privacy Settings</button>
</div>
</amp-consent>
<!-- End SourcePoint example -->
</div>
</body>
</html>