Skip to content

Commit 5c3e5b4

Browse files
committed
move analytics code to separate file
1 parent 146c0d5 commit 5c3e5b4

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

_includes/analytics.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script type="text/javascript">
2+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
3+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
4+
</script>
5+
<script type="text/javascript">
6+
try {
7+
var pageTracker = _gat._getTracker("UA-962663-21");
8+
pageTracker._trackPageview();
9+
} catch(err) {}
10+
</script>

_includes/footer.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@
55
Original code by <a href="https://github.com/andreascreten">Andreas Creten</a>. Project maintained by <a href="https://github.com/scribu">Cristi Burc&#259;</a>.
66
</div>
77
</footer>
8-
<script type="text/javascript">
9-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
10-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
11-
</script>
12-
<script type="text/javascript">
13-
try {
14-
var pageTracker = _gat._getTracker("UA-962663-21");
15-
pageTracker._trackPageview();
16-
} catch(err) {}
17-
</script>
8+
9+
{% include analytics.html %}
1810
</body>
1911
</html>

0 commit comments

Comments
 (0)