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
Simplify geolix database config
Uku Taht950bd012d546
diff --git a/config/runtime.exs b/config/runtime.exsindex 72a208bac2..f31c2bc41b 100644--- a/config/runtime.exs+++ b/config/runtime.exs@@ -386,7 +386,8 @@ if config_env() != :test && geolite2_country_db do%{id: :country,adapter: Geolix.Adapter.MMDB2,- source: geolite2_country_db+ source: geolite2_country_db,+ result_as: :raw}]enddiff --git a/lib/plausible_web/controllers/api/external_controller.ex b/lib/plausible_web/controllers/api/external_controller.exindex 26ec39cc5c..900bad93b3 100644--- a/lib/plausible_web/controllers/api/external_controller.ex+++ b/lib/plausible_web/controllers/api/external_controller.ex@@ -194,9 +194,7 @@ defmodule PlausibleWeb.Api.ExternalController doPlausibleWeb.RemoteIp.get(conn)|> Geolix.lookup()- if result && result[:country] && result[:country].country do- result[:country].country.iso_code- end+ get_in(result, [:country, :country, :iso_code])enddefp parse_referrer(_, nil), do: nil