From d0ed69f8aa752b05403a6cfb6b9200ac420c3102 Mon Sep 17 00:00:00 2001 From: Fabio Widmer Date: Wed, 12 Aug 2020 15:24:34 +0200 Subject: [PATCH] Add Plausible Analytics support --- app/config.py | 3 +++ example.env | 6 +++++- templates/base.html | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index 7ba40f00..f985b2e5 100644 --- a/app/config.py +++ b/app/config.py @@ -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") diff --git a/example.env b/example.env index 79d70470..ca552674 100644 --- a/example.env +++ b/example.env @@ -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 \ No newline at end of file +# 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 \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index c9ee9b5a..3ba70e9e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -68,6 +68,12 @@ + + {% if PLAUSIBLE_HOST and PLAUSIBLE_DOMAIN %} + + + {% endif %} +