Merge pull request #144 from louquillio/add-analytics-tracker

Add Google Analytics tracker; apply via templating `include`.
This commit is contained in:
Lou Quillio 2017-07-27 11:29:28 -07:00 committed by GitHub
commit dd54442673
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-103514536-1', 'auto');
ga('send', 'pageview');
</script>

View File

@ -122,5 +122,6 @@
<script src="{{ 'assets/js/bootstrap.min.js' | relative_url }}"></script> <script src="{{ 'assets/js/bootstrap.min.js' | relative_url }}"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="{{ 'assets/js/ie10-viewport-bug-workaround.js' | relative_url }}"></script> <script src="{{ 'assets/js/ie10-viewport-bug-workaround.js' | relative_url }}"></script>
{% include analytics.html%}
</body> </body>
</html> </html>

View File

@ -36,6 +36,7 @@
{{ content }} {{ content }}
{% include analytics.html%}
</body> </body>
</html> </html>