Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Fix bug with pageview queries stacking after verification retries (#5663)
RobertJoonas5b1925e6bb3b
diff --git a/lib/plausible_web/live/sites.ex b/lib/plausible_web/live/sites.exindex 1fb4dad8b0..fd363499b5 100644--- a/lib/plausible_web/live/sites.ex+++ b/lib/plausible_web/live/sites.ex@@ -295,6 +295,15 @@ defmodule PlausibleWeb.Live.Sites do<.icon_pin :if={[email protected]_at} class="size-4" /><span :if={[email protected]_at}>Pin Site</span></.dropdown_item>+ <.dropdown_item+ :if={Application.get_env(:plausible, :environment) == "dev"}+ href={Routes.site_path(PlausibleWeb.Endpoint, :delete_site, @site.domain)}+ method="delete"+ class="!flex items-center gap-x-2"+ >+ <Heroicons.trash class="size-4 text-red-500" />+ <span class="text-red-500">[DEV ONLY] Quick Delete</span>+ </.dropdown_item></:menu></.dropdown>"""diff --git a/lib/plausible_web/live/verification.ex b/lib/plausible_web/live/verification.exindex e96748ff65..1fcc0f2552 100644--- a/lib/plausible_web/live/verification.ex+++ b/lib/plausible_web/live/verification.ex@@ -45,7 +45,8 @@ defmodule PlausibleWeb.Live.Verification doslowdown: private[:slowdown] || 500,flow: params["flow"] || "",checks_pid: nil,- attempts: 0+ attempts: 0,+ polling_pageviews?: false)on_ee do@@ -198,15 +199,21 @@ defmodule PlausibleWeb.Live.Verification doif has_pageviews?(socket.assigns.site) doredirect_to_stats(socket)else- schedule_pageviews_check(socket)+ socket+ |> assign(polling_pageviews?: false)+ |> schedule_pageviews_check()end{:noreply, socket}enddefp schedule_pageviews_check(socket) do- Process.send_after(self(), :check_pageviews, socket.assigns.delay * 2)- socket+ if socket.assigns.polling_pageviews? do+ socket+ else+ Process.send_after(self(), :check_pageviews, socket.assigns.delay * 2)+ assign(socket, polling_pageviews?: true)+ endenddefp redirect_to_stats(socket) do