From 4352545742afc6c3042d502a86365b2b7b5ff2a0 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 28 Feb 2023 23:05:06 +0100 Subject: [PATCH 1/2] Analytics: add Plausible to our dashboard Use Plausible for dashboard's analytics. --- readthedocs/templates/base.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readthedocs/templates/base.html b/readthedocs/templates/base.html index 17a214e1b01..2f50ccc2e1c 100644 --- a/readthedocs/templates/base.html +++ b/readthedocs/templates/base.html @@ -58,6 +58,8 @@ {% endif %} + + {% block extra_links %}{% endblock %} From 399e410bb3ab3e6ced65dc5b4ed6a0b2ff623510 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 1 Mar 2023 15:41:48 +0100 Subject: [PATCH 2/2] Analytics only for logged in users. --- readthedocs/templates/base.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readthedocs/templates/base.html b/readthedocs/templates/base.html index 2f50ccc2e1c..06a6700694d 100644 --- a/readthedocs/templates/base.html +++ b/readthedocs/templates/base.html @@ -58,7 +58,10 @@ {% endif %} + {% if request.user.is_authenticated %} + {# Only tack logged-in users to avoid sending a lot of (maybe unrelevant) traffic #} + {% endif %}