Skip to content

Commit a07e1e0

Browse files
authored
Merge pull request #3767 from jasongrout/plausible
Add plausible stats tracking, consolidated with jupyter.org stats
2 parents 3178767 + 23c1944 commit a07e1e0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/source/conf.py

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

0 commit comments

Comments
 (0)