Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Don't track wrong password page

Uku Tahtf7180f96205e
diff --git a/lib/plausible_web/controllers/stats_controller.ex b/lib/plausible_web/controllers/stats_controller.ex
index b3228bce78..4732f1ae82 100644
--- a/lib/plausible_web/controllers/stats_controller.ex
+++ b/lib/plausible_web/controllers/stats_controller.ex
@@ -81,7 +81,9 @@ defmodule PlausibleWeb.StatsController do
if Plausible.Auth.Password.match?(password, shared_link.password_hash) do
shared_link_auth_success(conn, shared_link)
else
- render(conn, "shared_link_password.html", link: shared_link, error: "Incorrect password. Please try again.", layout: {PlausibleWeb.LayoutView, "focus.html"})
+ conn
+ |> assign(:skip_plausible_tracking, true)
+ |> render("shared_link_password.html", link: shared_link, error: "Incorrect password. Please try again.", layout: {PlausibleWeb.LayoutView, "focus.html"})
end
else
render_error(conn, 404)