Skip to content

Commit

Permalink
Add Google Analytics to the docs (#57)
Browse files Browse the repository at this point in the history
Track user visits so we can get a feel for how many people are using the
docs but anonymize their IPs and disable cookies.
  • Loading branch information
leouieda committed Apr 10, 2019
1 parent 0dfd310 commit 40c23f1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
{% extends "!layout.html" %}

{% block extrahead %}
{# Include require.js so that we can use WorldWind #}
<script src="{{ pathto('_static/require.js', 1) }}"></script>
<!-- Google Analytics tracking code -->
<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-38125837-1', 'auto', {'storage': 'none'});
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
</script>
{% endblock %}


Expand Down

0 comments on commit 40c23f1

Please sign in to comment.