Skip to content

Commit 0d94709

Browse files
authored
Track file downloads via Plausible (#2845)
* Remove obsolete Google Analytics JS * Track file downloads via Plausible
1 parent 27aef89 commit 0d94709

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

templates/base.html

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<!--[if gt IE 8]><!--><html class="no-js" lang="en" dir="ltr"> <!--<![endif]-->
66
{% load pipeline sitetree %}
77
<head>
8-
<script defer data-domain="python.org" src="https://analytics.python.org/js/script.outbound-links.js"></script>
8+
<script defer
9+
file-types="bz2,chm,dmg,exe,gz,json,msi,msix,pdf,pkg,tgz,xz,zip"
10+
data-domain="python.org"
11+
src="https://analytics.python.org/js/script.file-downloads.outbound-links.js"></script>
912

1013
<meta charset="utf-8">
1114
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -133,18 +136,6 @@
133136
}
134137
</script>
135138

136-
{# Asynchronous Analytics snippet #}
137-
<script type="text/javascript">
138-
var _gaq = _gaq || [];
139-
_gaq.push(['_setAccount', 'UA-39055973-1']);
140-
_gaq.push(['_trackPageview']);
141-
142-
(function() {
143-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
144-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
145-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
146-
})();
147-
</script>
148139
{% block head %}{% endblock %}
149140
</head>
150141

0 commit comments

Comments
 (0)