Add Plausible Analytics support

This commit is contained in:
Fabio Widmer 2020-08-12 15:24:34 +02:00
parent 0d1e5b1f7d
commit d0ed69f8aa
No known key found for this signature in database
GPG Key ID: B1EC11D925800D35
3 changed files with 14 additions and 1 deletions

View File

@ -295,3 +295,6 @@ DISABLE_ONBOARDING = "DISABLE_ONBOARDING" in os.environ
HCAPTCHA_SECRET = os.environ.get("HCAPTCHA_SECRET")
HCAPTCHA_SITEKEY = os.environ.get("HCAPTCHA_SITEKEY")
PLAUSIBLE_HOST = os.environ.get("PLAUSIBLE_HOST")
PLAUSIBLE_DOMAIN = os.environ.get("PLAUSIBLE_DOMAIN")

View File

@ -149,4 +149,8 @@ DISABLE_ONBOARDING=true
# set the 2 below variables to enable hCaptcha
# HCAPTCHA_SECRET=very_long_string
# HCAPTCHA_SITEKEY=00000000-0000-0000-0000-000000000000
# HCAPTCHA_SITEKEY=00000000-0000-0000-0000-000000000000
# Set the 2 below variables to enable Plausible Analytics
# PLAUSIBLE_HOST=https://plausible.io
# PLAUSIBLE_DOMAIN=yourdomain.com

View File

@ -68,6 +68,12 @@
<script
src="{{ url_for('static', filename='node_modules/multiple-select/dist/multiple-select.min.js') }}"></script>
{% if PLAUSIBLE_HOST and PLAUSIBLE_DOMAIN %}
<!-- Plausible Analytics library -->
<script async defer data-domain=”{{PLAUSIBLE_DOMAIN}}” src=”{{PLAUSIBLE_HOST}}/js/plausible.js”></script>
{% endif %}
<link rel="stylesheet" href="{{ url_for('static', filename='darkmode.css') }}?v={{ VERSION }}">
<link rel="stylesheet" type="text/css" href="/static/style.css?v={{ VERSION }}">