summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/base.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-04-12 15:36:41 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-04-12 17:35:53 -0700
commit554a5059c3b60d949075577611da7bceadbb4e49 (patch)
treee0c15ae6fd5d3d3f572fa986a99685ab6963f28b /python/fatcat_web/templates/base.html
parent83ae1d85d093f1f37bba74283b1d689bb1f1c346 (diff)
downloadfatcat-554a5059c3b60d949075577611da7bceadbb4e49.tar.gz
fatcat-554a5059c3b60d949075577611da7bceadbb4e49.zip
web: add goatcounter analytics
Same setup as scholar.archive.org
Diffstat (limited to 'python/fatcat_web/templates/base.html')
-rw-r--r--python/fatcat_web/templates/base.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/fatcat_web/templates/base.html b/python/fatcat_web/templates/base.html
index 73f33d0d..c17f81de 100644
--- a/python/fatcat_web/templates/base.html
+++ b/python/fatcat_web/templates/base.html
@@ -153,6 +153,16 @@
integrity="sha256-9H3HWYnPJ2bEHgkOrw+48KheOqYzTvJd1hbeU9sEDFk="
crossorigin="anonymous">
</script>
+{% if config.ENABLE_GOATCOUNTER -%}
+ <script>
+ window.goatcounter = {
+ /* title leaks search query, so don't report it */
+ title: "",
+ {# to allow localhost connections (dev) to be colected, set: allow_local: true #}
+ };
+ </script>
+ <script data-goatcounter="{{ config.GOATCOUNTER_ENDPOINT }}" async src="{{ config.GOATCOUNTER_SCRIPT_URL }}"></script>
+{%- endif %}
{% block postscript %}{% endblock %}
</body>