Skip to content

Commit

Permalink
Fix plausible logging on doc_libs_placeholder based pages (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
daveoconnor committed Jan 7, 2025
1 parent 76b2455 commit 4187f25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ def process_content(self, content):
else:
# potentially pass version if needed for HTML modification
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,
Expand Down
4 changes: 3 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
<html lang="{{ LANGUAGE_CODE }}">

<head>
<script defer
{% if not disable_plausible %}
<script defer
data-domain="preview.boost.org"
src="https://plausible.io/js/script.manual.js"></script>
{% endif %}
<title>{% block title %}Boost{% endblock %}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down

0 comments on commit 4187f25

Please sign in to comment.