Skip to content

Commit c9529bc

Browse files
committed
Moved google analytics code to head
1 parent c0904e3 commit c9529bc

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

index.htm

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@
102102
<script src="bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.min.js" charset="UTF-8"></script>
103103
<script src="bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-TW.min.js" charset="UTF-8"></script>
104104

105+
<script>
106+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
107+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
108+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
109+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
110+
111+
ga('create', 'UA-77474606-1', 'auto');
112+
ga('require', 'linkid');
113+
ga('send', 'pageview');
114+
</script>
105115
</head>
106116

107117
<body>
@@ -623,15 +633,6 @@ <h2>bootstrap-datepicker sandbox <small>&alpha;lph&alpha;</small></h2>
623633

624634
$(page).trigger('change:bootstrap', page.bootstrap)
625635
});
626-
627-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
628-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
629-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
630-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
631-
632-
ga('create', 'UA-77474606-1', 'auto');
633-
ga('require', 'linkid');
634-
ga('send', 'pageview');
635636
</script>
636637
<div class="row form-horizontal">
637638
<div class="span5 col-md-5" id="sandbox-container"></div>

0 commit comments

Comments
 (0)