forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analytics-vendors.amp.html
639 lines (605 loc) · 18.2 KB
/
analytics-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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>AMP Analytics</title>
<link rel="canonical" href="analytics.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;
}
</style>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-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>
</head>
<body>
<div id="container">
Container for analytics tags. Positioned far away from top to make sure that doesn't matter.
<!-- Adobe Analytics example -->
<!--
For complete documentation and additional examples please see: https://marketing.adobe.com/resources/help/en_US/sc/implement/accelerated-mobile-pages.html
-->
<amp-analytics type="adobeanalytics" id="adobeanalytics">
+<!-- adobeanalytics type -->
<script type="application/json">
{
"requests": {
"myClick": "${click}&v1=${eVar1}"
},
"vars": {
"host": "metrics.example.com",
"reportSuites": "reportSuiteID"
},
"triggers": {
"pageLoad": {
"on": "visible",
"request": "pageview"
},
"click": {
"on": "click",
"selector": "#test1",
"request": "myClick",
"vars": {
"eVar1": "button clicked"
}
}
}
}
</script>
</amp-analytics>
<!-- adobeanalytics_nativeConfig type -->
<amp-analytics type="adobeanalytics_nativeConfig" id="adobeanalytics_nativeConfig">
<script type="application/json">
{
"requests": {
"base": "https://${host}",
"iframeMessage": "${base}/stats.html?campaign=${queryParam(campaign)}&pageURL=${ampdocUrl}"
},
"vars": {
"host": "example.publishersite.com"
},
"extraUrlParams": {
"pageName": "Adobe Analytics using amp-analytics adobeanalytics_nativeConfig",
"v1": "eVar1 test value"
}
}
</script>
</amp-analytics>
<!-- End Adobe Analytics example -->
<!-- AT Internet tracking -->
<amp-analytics type="atinternet" id="atinternet">
<script type="application/json">
{
"vars": {
"site": "123456",
"log": "logs",
"domain": ".xiti.com",
"title": "pageChapter::pageTitle",
"level2": "10"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview"
},
"links": {
"on": "click",
"selector": "#test1",
"request": "click",
"vars": {
"label": "clickChapter::clickLabel",
"level2Click": "12",
"type": "a"
}
}
}
}
</script>
</amp-analytics>
<!-- End AT Internet tracking -->
<!-- AFS Analytics tracking -->
<amp-analytics type="afsanalytics">
<script type="application/json">
{
"vars": {
"server":"www3",
"websiteid": "00345340",
}
}
</script>
</amp-analytics>
<!-- End AFS Analytics tracking -->
<!-- Burt tracking -->
<amp-analytics type="burt" id="burt">
<script type="application/json">
{
"vars": {
"trackingKey": "B31VT4QH1BFR",
"category": "sports",
"subCategory": "golf"
}
}
</script>
</amp-analytics>
<!-- End Burt example -->
<!-- Chartbeat tracking -->
<amp-analytics type="chartbeat" id="chartbeat">
<script type="application/json">
{
"vars": {
"uid": "12345",
"domain": "my-site.com",
"sections": "section 1, section 2"
}
}
</script>
</amp-analytics>
<!-- End Chartbeat example -->
<!-- Clicky tracking -->
<amp-analytics type="clicky" id="clicky">
<script type="application/json">
{
"vars": {
"site_id": "12345"
}
}
</script>
</amp-analytics>
<!-- End Clicky example -->
<!-- ColAnalytics pageview tracking -->
<amp-analytics type="colanalytics" id="colanalytics">
<script type="application/json">
{
"vars": {
"id": "100000"
}
}
</script>
</amp-analytics>
<!-- End ColAnalytics example -->
<!-- comScore UDM pageview tracking -->
<amp-analytics type="comscore" id="comscore">
<script type="application/json">
{
"vars": {
"c2": "1000001"
}
}
</script>
</amp-analytics>
<!-- End comScore example -->
<!-- Cxense tracking -->
<amp-analytics type="cxense" id="cxense">
<script type="application/json">
{
"vars": {
"siteId": "1234567890"
}
}
</script>
</amp-analytics>
<!-- End Cxense example -->
<amp-analytics type="googleanalytics" id="googleanalytics">
<script type="application/json">
{
"extraUrlParams" : {
"dimension5": "AMP",
"metric17": "10"
},
"vars": {
"account": "UA-YYYY-Y"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview",
"vars": {
"title": "Example Pageview"
}
},
"clickOnTest1Trigger": {
"on": "click",
"selector": "#test1",
"request": "event",
"vars": {
"eventCategory": "examples",
"eventAction": "clicked-test1"
}
},
"clickOnTopTrigger": {
"on": "click",
"selector": "#top",
"request": "event",
"vars": {
"eventCategory": "examples",
"eventAction": "clicked-header"
}
}
}
}
</script>
</amp-analytics>
<!--
INFOnline example
Important: url needs to point to a copy of
amp-analytics-infonline.html on a different subdomain
than your AMP files.
-->
<amp-analytics type="infonline" id="infonline">
<script type="application/json">
{
"vars": {
"st": "angebotskennung",
"co": "comment",
"cp": "code"
},
"requests": {
"url": "https://3p.ampproject.net/custom/amp-analytics-infonline.html"
}
}
</script>
</amp-analytics>
<!-- End INFOnline example -->
<!-- Krux tracking. Ensure you replace KMnP7vhh with your configuration ID. -->
<amp-analytics type="krux" id="krux" config="https://cdn.krxd.net/controltag/amp/KMnP7vhh.json">
<script type="application/json">
{
"vars": {
"section": "amp",
"subsection": "examples"
},
"extraUrlParams": {
"user.status": "developer",
"page.keywords": "amp, mobile, examples"
}
}
</script>
</amp-analytics>
<!-- Linkpulse example - please replace id with your Linkpulse id -->
<amp-analytics type="linkpulse" id="linkpulse">
<script type="application/json">
{
"vars": {
"id": "aabbcceedd00000000000000"
}
}
</script>
</amp-analytics>
<!-- End Linkpulse example -->
<!-- Lotame tracking.
Please replace the value for "account" (12345)
with the correct Lotame Client ID.
The extraUrlParams are provided as an example,
the correct values are case-specific.
-->
<amp-analytics type="lotame" id="lotame">
<script type="application/json">
{
"vars": {
"account": 12345
},
"extraUrlParams": {
"int": "sports",
"gen": "m"
}
}
</script>
</amp-analytics>
<!-- End Lotame example -->
<!-- Mediametrie tracking
serial is the account id (required)
level1 to 4 are page levels (optional)
-->
<amp-analytics type="mediametrie" id="mediametrie">
<script type="application/json">
{
"vars": {
"serial": "241041208720",
"level1": "level1-test-amp",
"level2": "level2-test-amp",
"level3": "level3",
"level4": "level4"
}
}
</script>
</amp-analytics>
<!-- End Mediametrie example -->
<!-- mParticle tracking
Ensure you replace AppKey with your Application key
-->
<amp-analytics type="mparticle" id="mparticle">
<script type="application/json">
{
"vars": {
"apiKey": "AppKey"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},
"trackPageviewWithCustomTitleAndUrl": {
"on": "visible",
"request": "pageview",
"vars": {
"title": "Custom Title",
"ampdocUrl" : "http://www.example.com"
}
},
"trackAppEvent": {
"on": "click",
"selector": "#test1",
"request": "event",
"vars": {
"eventName": "AMP Test 1 button clicked",
"eventType": "Unknown",
"eventAttributes_Keys": ["test key1","test key2"],
"eventAttributes_Values": ["test value1","test value2"],
"userAttributes_Keys": ["test user attr key1","test user attr key2"],
"userAttributes_Values": ["test user attr value1","test user attr value2"],
"userIdentities_Types" : ["facebook", "twitter"],
"userIdentities_Values" : ["[email protected]", "@example"],
"debug": "true",
"location": [26.4619396, -80.0691996],
"customFlags_Keys": ["custom flag1", "custom flag2"],
"customFlags_Values": ["[100, 200]", "[test val1, test val2]"],
"appVersion": "1.0"
}
}
}
}
</script>
</amp-analytics>
<!-- End mParticle example -->
<!-- OEWA example -->
<amp-analytics type="oewa" id="oewa">
<script type="application/json">
{
"vars": {
"s": "offer",
"cp": "RedCont/Nachrichten/NachrichtenUeberblick"
},
"requests": {
"url": "https://subdomain.domain.example/amp-analytics-oewa.html"
}
}
</script>
</amp-analytics>
<!-- End OEWA example -->
<!-- OEWADIRECT example -->
<amp-analytics type="oewadirect" id="oewadirect">
<script type="application/json">
{
"vars": {
"s": "offer",
"cp": "RedCont/Nachrichten/NachrichtenUeberblick"
}
}
</script>
</amp-analytics>
<!-- End OEWADIRECT example -->
<!-- Parsely tracking -->
<amp-analytics type="parsely" id="parsely">
<script type="application/json">
{
"vars": {
"apikey": "example.com"
}
}
</script>
</amp-analytics>
<!-- Start Piano example -->
<amp-analytics type="piano" id="piano">
<script type="application/json">
{
"vars": {
"aid": "AIDAIDAID",
"contentCreated": "2015-02-16T05:00:00",
"contentSection": "Sports",
"contentAuthor": "John Higgins",
"tags": ["sports"]
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageview"
}
}
}
</script>
</amp-analytics>
<!-- End Piano example -->
<!-- Quantcast tracking -->
<amp-analytics type="quantcast" id="quantcast">
<script type="application/json">
{
"vars": {
"pcode": "p-1234567890abc",
"labels": ["Example.label.1", "Example.label.2"]
}
}
</script>
</amp-analytics>
<!-- End Quantcast example -->
<!-- Segment analytics tracking -->
<amp-analytics type="segment" id="segment">
<script type="application/json">
{
"vars": {
"writeKey": "p74lml96co",
"name": "Page name"
},
"extraUrlParams": {
"properties.author.name": "John"
},
"triggers": {
"click": {
"on": "click",
"selector": "#test1",
"request": "track",
"vars": {
"event": "click"
}
}
}
}
</script>
</amp-analytics>
<!-- SimpleReach Tracking -->
<amp-analytics type="simplereach" id="simplereach">
<script type="application/json">
{
"vars": {
"pid": "000000000000000000000000",
"title": "a title",
"authors": ["john smith", "jane doe", "last name, first name"],
"categories": ["sports", "football"],
"tags": ["big-game", "nfl"],
"published_at": "2015-01-01 00:00:00"
}
}
</script>
</amp-analytics>
<!-- End SimpleReach Example -->
<!-- Snowplow Analytics tracking -->
<amp-analytics type="snowplow" id="snowplow">
<script type="application/json">
{
"vars": {
"collectorHost": "d3rkrsqld9gmqf.cloudfront.net",
"appId": "amp-examples"
},
"triggers": {
"defaultPageview": {
"on": "visible",
"request": "pageView"
},
"clickOnTest1Trigger": {
"on": "click",
"selector": "#test1",
"request": "structEvent",
"vars": {
"structEventCategory": "examples",
"structEventAction": "clicked-test1"
}
},
"clickOnTopTrigger": {
"on": "click",
"selector": "#top",
"request": "structEvent",
"vars": {
"structEventCategory": "examples",
"structEventAction": "clicked-header"
}
}
}
}
</script>
</amp-analytics>
<!-- End Snowplow Analytics example -->
<!-- SOASTA mPulse example -->
<amp-analytics type="mpulse" id="mpulse" config="https://c.go-mpulse.net/api/amp-config.json?d=SOURCE_HOST&key=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX">
<script type="application/json">
{
"extraUrlParams": {
"ab_test": "a",
"page_group": "Home",
"custom_metric.Cache_Hits": 15,
"custom_metric.Cache_Misses": "0",
"custom_metric.SQL_Queries": 2,
"custom_dimension.Market_Vertical": "Sports",
"custom_dimension.Page_Language": "English"
}
}
</script>
</amp-analytics>
<!-- End SOASTA mPulse example -->
<!-- Webtrekk tracking -->
<amp-analytics type="webtrekk" id="webtrekk">
<script type="application/json">
{
"vars": {
"trackDomain": "q3.webtrekk.net",
"trackId": "111111111111111",
"contentId": "en.example"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
}
}
}
</script>
</amp-analytics>
<!-- End Webtrekk example -->
</div>
<div class="logo"></div>
<h1 id="top">AMP Analytics</h1>
<span id="test1" class="box" data-vars-title="Example request with element level overrides">
Click here to generate an event
</span>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam pellentesque augue quis elementum tempus. Pellentesque sit amet neque bibendum, sagittis purus vitae, pellentesque magna. Vestibulum non viverra metus, eget feugiat lacus. Nulla in maximus orci. Maecenas id turpis vel ipsum vestibulum bibendum ut sit amet magna. Nullam hendrerit ex at est eleifend, nec dignissim nibh rutrum. Aliquam quis tellus et nibh faucibus laoreet in eget turpis. Nam quam nisl, porttitor vel ex eget, dapibus placerat dui. Mauris commodo pellentesque leo, eu tempus quam. In hac habitasse platea dictumst. Suspendisse non ante finibus, luctus augue non, luctus orci. Vestibulum ornare lacinia aliquam. In sollicitudin vehicula vulputate. Sed mi elit, commodo nec sapien nec, pretium bibendum leo. Donec id justo tortor. Ut in mauris dapibus, laoreet metus vitae, dictum nisi.
</p>
<p>
Integer dapibus egestas arcu. Nunc vitae velit congue, placerat augue quis, suscipit nisi. Donec suscipit imperdiet turpis pharetra feugiat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus aliquam eleifend dolor, at lacinia orci semper vel. Nunc semper sem vel tincidunt posuere. Nunc lobortis velit vitae condimentum mollis. Morbi eu ullamcorper mauris. Pellentesque ac eros maximus, pulvinar sapien vitae, semper nisi. Curabitur imperdiet non mauris vitae sollicitudin.
</p>
<p>
Nam posuere velit euismod risus pulvinar, in sollicitudin sapien consectetur. Vestibulum nec ex odio. Quisque at elit nec nunc ultricies lacinia nec non lorem. Maecenas porttitor consequat mauris, vitae porttitor ligula pellentesque ut. Pellentesque rhoncus diam vel lacus lobortis imperdiet. Sed maximus dictum hendrerit. Vivamus ornare, purus in laoreet sagittis, est ante pretium mauris, vel vulputate arcu erat eget mauris. Suspendisse eu lorem metus. Aliquam tempus aliquet urna, vitae mollis lacus pretium vitae. Etiam semper gravida commodo. Maecenas at pulvinar quam. Nullam dolor ipsum, ornare a sollicitudin et, sodales porttitor neque.
</p>
<p>
Integer in felis at lacus mattis facilisis. Curabitur tincidunt, felis porttitor mollis finibus, tortor elit elementum dolor, vel vulputate lorem dui id ante. Vivamus in velit at lectus blandit gravida vitae quis arcu. Nam et magna magna. Fusce condimentum diam lacus, ac ullamcorper purus malesuada eu. Mauris ullamcorper elit et venenatis faucibus. Nullam lobortis molestie purus quis pellentesque. Sed at libero id nisi rhoncus tincidunt. Praesent vestibulum vehicula tristique. Etiam rutrum, nunc id porta interdum, nulla nisi molestie leo, at fermentum justo dolor at lorem. Duis in egestas sapien.
</p>
<p>
Donec pharetra molestie sollicitudin. Duis mattis eleifend rutrum. Quisque luctus tincidunt lacus, vitae lobortis nisi malesuada ac. Aliquam mattis leo vel elit rutrum, nec consequat massa vestibulum. Maecenas bibendum metus nec ante feugiat, eu faucibus orci mattis. Cras tristique sem non elit congue malesuada. Proin ornare, lacus et porttitor consequat, sapien urna rutrum diam, ac pellentesque ligula est eget nisi. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec ultrices sollicitudin eros a placerat. Proin eget pulvinar est. Donec posuere ultrices odio at ultrices. Suspendisse potenti. Phasellus id orci id purus porttitor consectetur a at erat. Nullam volutpat ultricies nisl id maximus. Morbi porta ex ante, et egestas odio ultricies consequat.
</p>
<p>
</p><ul>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li>Aliquam in ex porta, imperdiet elit sit amet, condimentum diam.</li>
<li>Etiam fermentum nisi at porta pulvinar.</li>
</ul>
<p></p>
<p>
</p><ul>
<li>Proin mattis neque vel elit posuere molestie.</li>
<li>Integer tincidunt sem sed nunc auctor elementum.</li>
<li>Integer a felis in ipsum aliquet auctor sit amet a neque.</li>
</ul>
<p></p>
<p>
</p><ul>
<li>Sed suscipit dolor molestie, rhoncus quam ac, lacinia ex.</li>
<li>Curabitur et tellus vel justo ultrices aliquet sed id turpis.</li>
<li>Nam finibus risus at justo elementum bibendum.</li>
<li>In non lacus non urna congue feugiat at vel diam.</li>
</ul>
<p></p>
<p>
</p><ul>
<li>Integer hendrerit augue interdum dui venenatis, sit amet tristique mauris cursus.</li>
<li>Etiam quis eros viverra, tincidunt justo in, facilisis nunc.</li>
<li>Aliquam at lacus faucibus, congue lorem interdum, semper mauris.</li>
<li>Ut vulputate erat vel feugiat pharetra.</li>
<li>Morbi id augue id orci sagittis tempus.</li>
<li>Vestibulum varius libero ac dignissim sodales.</li>
</ul>
<p></p>
<p>
</p><ul>
<li>Aenean ac sem eget libero varius viverra sit amet vitae nunc.</li>
</ul>
<p></p>
</body>
</html>