Add Google analytics tracking

This commit is contained in:
Jeremy Zhang 2017-04-09 11:37:34 -07:00
parent 1e1936bcbe
commit 38177ff8a8
3 changed files with 12 additions and 0 deletions

View File

@ -129,5 +129,7 @@
<script type="text/javascript" src="{{ url_for('static', filename='js/embed.js') }}"></script> <script type="text/javascript" src="{{ url_for('static', filename='js/embed.js') }}"></script>
{% include 'google_analytics.html.j2' %}
</body> </body>
</html> </html>

View File

@ -0,0 +1,9 @@
<script>
!function(T,i,t,a,n){T.GoogleAnalyticsObject=t;T[t]||(T[t]=function(){
(T[t].q=T[t].q||[]).push(arguments)});T[t].l=+new Date;a=i.createElement('script');
n=i.scripts[0];a.src='//www.google-analytics.com/analytics.js';
n.parentNode.insertBefore(a,n)}(window,document,'ga');
ga('create', 'UA-97073231-1', 'auto');
ga('send', 'pageview');
</script>

View File

@ -52,5 +52,6 @@
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/js/materialize.min.js" integrity="sha256-ToPQhpo/E89yaCd7+V8LUCjobNRkjilRXfho6x3twLU=" crossorigin="anonymous"></script> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/js/materialize.min.js" integrity="sha256-ToPQhpo/E89yaCd7+V8LUCjobNRkjilRXfho6x3twLU=" crossorigin="anonymous"></script>
{% block script %}{% endblock %} {% block script %}{% endblock %}
{% include 'google_analytics.html.j2' %}
</body> </body>
</html> </html>