Merge pull request #259 from FabioWidmer/plausible-analytics-support

Plausible Analytics Support
This commit is contained in:
Son Nguyen Kim 2020-08-12 20:25:37 +02:00 committed by GitHub
commit cb687c4248
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 }}">