From 243fcf7be0149ab7ee18a08ac5ab4c842944f659 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Mon, 17 Nov 2025 11:59:37 -0700 Subject: [PATCH 1/2] Add plausible stats tracking, consolidated with jupyter.org stats This PR is similar to https://github.com/jupyter/jupyter/pull/797 --- docs/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index f3e2e15..88415e7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -138,3 +138,11 @@ 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})", + ) From 181aa975f50b7e75d3f72360cf00c7ae595b8481 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 19:01:13 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 88415e7..7efec66 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -139,9 +139,12 @@ rediraffe_redirects = { "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( + "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})",