1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
Description: Disable loading Google Analytics in godoc pages.
--- a/godoc/static/godoc.html
+++ b/godoc/static/godoc.html
@@ -17,19 +17,6 @@
<link rel="stylesheet" href="/lib/godoc/jquery.treeview.css">
{{end}}
<script>window.initFuncs = [];</script>
-{{with .GoogleAnalytics}}
-<script type="text/javascript">
-var _gaq = _gaq || [];
-_gaq.push(["_setAccount", "{{.}}"]);
-window.trackPageview = function() {
- _gaq.push(["_trackPageview", location.pathname+location.hash]);
-};
-window.trackPageview();
-window.trackEvent = function(category, action, opt_label, opt_value, opt_noninteraction) {
- _gaq.push(["_trackEvent", category, action, opt_label, opt_value, opt_noninteraction]);
-};
-</script>
-{{end}}
<script src="/lib/godoc/jquery.js" defer></script>
{{if .TreeView}}
<script src="/lib/godoc/jquery.treeview.js" defer></script>
@@ -129,15 +116,6 @@
</div><!-- .container -->
</div><!-- #page -->
-{{if .GoogleAnalytics}}
-<script type="text/javascript">
-(function() {
- var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
- ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
- var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
-})();
-</script>
-{{end}}
</body>
</html>
|