-
Notifications
You must be signed in to change notification settings - Fork 3
/
youtube.html
78 lines (65 loc) · 2.55 KB
/
youtube.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
<!DOCTYPE html>
<html>
<head>
<title>YouTube Plugins<span id="selection-marker-1" class="redactor-selection-marker"></span></title>
<!-- YOUTUBE PLUGIN-->
<script src="https://www.youtube.com/iframe_api"></script>
<!-- YOUTUBE PLUGIN-->
<!-- SEGMENT-->
<script>
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="xARslrUkCF2Q6k5el9DnFTQtUJy3h2r5";;analytics.SNIPPET_VERSION="4.15.3";
analytics.load("xARslrUkCF2Q6k5el9DnFTQtUJy3h2r5");
analytics.page();
}}();
</script>
<!-- SEGMENT-->
</head>
<body>
<h1>Segment YouTube Plugins</h1>
<p></p>
<a href="https://segment.com/docs/connections/sources/catalog/libraries/website/plugins/youtube/">Documentation here</a>
<p>
<br>
<br>
<br>
<!-- Youtube plugin-->
<p>
<h2>Video 1</h2>
<p>
<br>
<div class="video-site">
<div class="first-video">
<div id="player1"></div>
</div>
<p>
<h2>Video 2</h2>
<p>
<br>
<div class="second-video">
<div id="player2"></div>
</div>
</div>
<script>
var player1;
var player2;
function onYouTubeIframeAPIReady() {
player1 = new YT.Player('player1', {
height: '250',
width: '500',
videoId: 'kOdg9f5VAAU'
});
player2 = new YT.Player('player2', {
height: '250',
width: '500',
videoId: 'CHVNRWqVgw0'
});
analytics.ready(function () {
var ytAnalytics1 = new window.analytics.plugins.YouTubeAnalytics(player1, 'AIzaSyCXMtrgMn78K8UTxRLjhzKjocdChshoWYs')
ytAnalytics1.initialize();
var ytAnalytics2 = new window.analytics.plugins.YouTubeAnalytics(player2, 'AIzaSyCXMtrgMn78K8UTxRLjhzKjocdChshoWYs')
ytAnalytics2.initialize();
})}
</script>
<!-- Youtube plugin-->
</body>
</html>