Skip to content

Commit

Permalink
Merge pull request #201 from felixcs1/analytics1
Browse files Browse the repository at this point in the history
Move analytics script into head from bottom of the page
  • Loading branch information
CelineBoudier committed Jul 29, 2016
2 parents ffd6367 + eeeb3f0 commit 60fb78b
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions portal/templates/portal/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@
{% block scripts %}
{% endblock scripts %}

<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','//www.google-analytics.com/analytics.js','ga');


ga('create', 'UA-49883146-1', 'auto');
ga('send', 'pageview');

</script>

<script src="/static/portal/js/riveted.min.js"></script>
<script>riveted.init();</script>

</head>

<body>
Expand Down Expand Up @@ -155,20 +170,7 @@ <h1>Code for Life</h1>
});
</script>

<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','//www.google-analytics.com/analytics.js','ga');


ga('create', 'UA-49883146-1', 'auto');
ga('send', 'pageview');

</script>

<script src="/static/portal/js/riveted.min.js"></script>
<script>riveted.init();</script>

</body>
</html>

0 comments on commit 60fb78b

Please sign in to comment.