summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/web_config.py
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/web_config.py
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/web_config.py')
-rw-r--r--python/fatcat_web/web_config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/fatcat_web/web_config.py b/python/fatcat_web/web_config.py
index 5d2da830..25c93114 100644
--- a/python/fatcat_web/web_config.py
+++ b/python/fatcat_web/web_config.py
@@ -52,6 +52,11 @@ class Config(object):
IA_XAUTH_CLIENT_ID = os.environ.get("IA_XAUTH_CLIENT_ID", default=None)
IA_XAUTH_CLIENT_SECRET = os.environ.get("IA_XAUTH_CLIENT_SECRET", default=None)
+ # analytics; used in production
+ ENABLE_GOATCOUNTER = bool(os.environ.get("ENABLE_GOATCOUNTER", default=False))
+ GOATCOUNTER_ENDPOINT = os.environ.get("GOATCOUNTER_ENDPOINT", default="https://goatcounter.fatcat.wiki/count")
+ GOATCOUNTER_SCRIPT_URL = os.environ.get("GOATCOUNTER_SCRIPT_URL", default="https://goatcounter.fatcat.wiki/count.js")
+
# controls granularity of "shadow_only" preservation category
FATCAT_MERGE_SHADOW_PRESERVATION = os.environ.get("FATCAT_MERGE_SHADOW_PRESERVATION", default=False)