mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #1050 from jasongrout/plausible
Add plausible stats tracking, consolidated with jupyter.org stats
This commit is contained in:
11
docs/conf.py
11
docs/conf.py
@@ -138,3 +138,14 @@ rediraffe_redirects = {
|
||||
"howto/env/notebook-interfaces": "howto/user-env/notebook-interfaces",
|
||||
"howto/env/server-resources": "howto/user-env/server-resources",
|
||||
}
|
||||
|
||||
|
||||
def setup(app):
|
||||
# Enable Plausible.io stats
|
||||
app.add_js_file(
|
||||
"https://plausible.io/js/pa-B75UO5--FNXYQSG7GBWkf.js", loading_method="async"
|
||||
)
|
||||
app.add_js_file(
|
||||
filename=None,
|
||||
body="window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};plausible.init({hashBasedRouting:true})",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user