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
Allow empty city geonames in exports (#4079)
ruslandogab1c13617b352
diff --git a/lib/plausible/exports.ex b/lib/plausible/exports.exindex a769be5649..eed07ca9bd 100644--- a/lib/plausible/exports.ex+++ b/lib/plausible/exports.ex@@ -470,8 +470,8 @@ defmodule Plausible.Exports dodefp export_locations_q(site_id, timezone, date_range) dofrom s in sampled("sessions_v2"),where: ^export_filter(site_id, date_range),- where: s.city_geoname_id != 0 and s.country_code != "\0\0" and s.country_code != "ZZ",- group_by: [selected_as(:date), s.country_code, selected_as(:region), s.city_geoname_id],+ where: s.country_code != "\0\0" and s.country_code != "ZZ",+ group_by: [selected_as(:date), s.country_code, s.subdivision1_code, s.city_geoname_id],order_by: selected_as(:date),select: [date(s.timestamp, ^timezone),