Skip to content

Commit e1b89c8

Browse files
jorisvandenbosschejreback
authored andcommitted
DOC: add anonymizeIp for Google analytics in docs (pandas-dev#27662)
1 parent 95be01d commit e1b89c8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

doc/source/themes/nature_with_gtoc/layout.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
9494
});
9595
});
9696
</script>
97-
<script type="text/javascript">
98-
var _gaq = _gaq || [];
99-
_gaq.push(['_setAccount', 'UA-27880019-2']);
100-
_gaq.push(['_trackPageview']);
10197

102-
(function() {
103-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
104-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
105-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
106-
})();
98+
<!-- Google Analytics -->
99+
<script>
100+
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
101+
ga('create', 'UA-27880019-2', 'auto');
102+
ga('set', 'anonymizeIp', true);
103+
ga('send', 'pageview');
107104
</script>
105+
<script async src='https://www.google-analytics.com/analytics.js'></script>
106+
<!-- End Google Analytics -->
107+
108108
{% endblock %}

0 commit comments

Comments
 (0)