Skip to content

Commit 3209c86

Browse files
committed
Add plausible stats tracking, consolidated with jupyter.org stats
I noticed that these docs are served from jupyter.org. This PR is similar to jupyter/jupyter#797. Stats would show up at https://plausible.io/jupyter.org
1 parent 3178767 commit 3209c86

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/source/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,3 +317,11 @@ def parse_schema(d, md=[], depth=0, pre=""):
317317
"architecture": "administrator/architecture",
318318
"advanced": "administrator/advanced",
319319
}
320+
321+
def setup(app):
322+
# Enable Plausible.io stats for jupyter.org
323+
app.add_js_file("https://plausible.io/js/pa-B75UO5--FNXYQSG7GBWkf.js", loading_method="async")
324+
app.add_js_file(
325+
filename=None,
326+
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})",
327+
)

0 commit comments

Comments
 (0)