Add support for Cloudflare Web Analytics

This commit is contained in:
Vincent Cheng 2023-01-17 07:13:32 -08:00
parent d9c1fd07ab
commit 8bd43aa247
3 changed files with 8 additions and 0 deletions

View file

@ -182,6 +182,7 @@
{% include "partial/matomo.html" %}
{% include 'partial/github.html' %}
{% include 'partial/stork.html' %}
{% include 'partial/cf_analytics.html' %}
{% block additional_js %}{% endblock %}
</body>

View file

@ -0,0 +1,6 @@
{% if CLOUDFLARE_WEB_ANALYTICS_TOKEN %}
<script defer
src='https://static.cloudflareinsights.com/beacon.min.js'
data-cf-beacon='{"token": "{{ CLOUDFLARE_WEB_ANALYTICS_TOKEN }}"}'>
</script>
{% endif %}