added google analytics

This commit is contained in:
espern
2014-02-25 12:56:55 +01:00
parent f21cb73eda
commit 6f6d3d4d94
2 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{% if GOOGLE_ANALYTICS %}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
pageTracker._trackPageview();
} catch(err) {}</script>
{% endif %}

View File

@@ -58,5 +58,6 @@
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</div><!-- container -->
{% include 'analytics.html' %}
</body>
</html>