Permalink
Browse files

Merge pull request #765 from minrk/anonymize-ip

enable google-analytics ip-anonymization
  • Loading branch information...
minrk committed Apr 10, 2018
2 parents bbf4b7b + 5b341af commit 38e181afeec4b7527a8a13ef7c3814e36045244c
Showing with 3 additions and 1 deletion.
  1. +3 −1 nbviewer/templates/layout.html
@@ -168,7 +168,9 @@
(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', '{{ google_analytics_id }}', 'auto');
ga('create', '{{ google_analytics_id }}', 'auto',
{'storage': 'none'});
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
</script>
{% endif %}

0 comments on commit 38e181a

Please sign in to comment.