From 8224425accf2b5816da537d1cb3d82fe4bfb136a Mon Sep 17 00:00:00 2001 From: daveoconnor Date: Tue, 7 Jan 2025 12:03:43 -0800 Subject: [PATCH] Fix plausible logging on doc_libs_placeholder based pages (#1579) (#1582) --- core/views.py | 8 ++++++-- templates/base.html | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/views.py b/core/views.py index 446454f0..a4d9ede5 100644 --- a/core/views.py +++ b/core/views.py @@ -477,9 +477,13 @@ def process_content(self, content): ) context["content"] = soup.prettify() else: - # potentially pass version if needed for HTML modification + # Potentially pass version if needed for HTML modification. + # We disable plausible to prevent redundant 'about:srcdoc' tracking, + # tracking is covered by docsiframe.html base_html = render_to_string( - "docs_libs_placeholder.html", context, request=self.request + "docs_libs_placeholder.html", + {**context, **{"disable_plausible": True}}, + request=self.request, ) context["content"] = modernize_legacy_page( content, diff --git a/templates/base.html b/templates/base.html index d65d5b08..696aac10 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,9 +5,11 @@ - + {% endif %} {% block title %}Boost{% endblock %}