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
Mix format
Uku Tahtbd797c201f96
diff --git a/lib/plausible_web/controllers/api/external_controller.ex b/lib/plausible_web/controllers/api/external_controller.exindex fe737eae0f..eda4002ca3 100644--- a/lib/plausible_web/controllers/api/external_controller.ex+++ b/lib/plausible_web/controllers/api/external_controller.ex@@ -205,7 +205,8 @@ defmodule PlausibleWeb.Api.ExternalController dodefp get_root_domain(hostname) when is_binary(hostname) doPublicSuffix.registrable_domain(hostname)end- defp get_root_domain(hostname), do: hostname++ defp get_root_domain(hostname), do: hostnamedefp calculate_screen_size(nil), do: nildefp calculate_screen_size(width) when width < 576, do: "Mobile"diff --git a/test/plausible_web/controllers/api/external_controller_test.exs b/test/plausible_web/controllers/api/external_controller_test.exsindex 3c4e5e482b..dd7318d6cc 100644--- a/test/plausible_web/controllers/api/external_controller_test.exs+++ b/test/plausible_web/controllers/api/external_controller_test.exs@@ -815,7 +815,9 @@ defmodule PlausibleWeb.Api.ExternalControllerTest doassert one.user_id != two.user_idend- test "different hostname results in the same user ID when the root domain in the same", %{conn: conn} do+ test "different hostname results in the same user ID when the root domain in the same", %{+ conn: conn+ } doparams = %{url: "https://user-id-test-domain.com/",domain: "user-id-test-domain-6.com",