Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added comments

Blue Mousefc93c9b82926
diff --git a/apps/production/src/analytics/analytics.service.ts b/apps/production/src/analytics/analytics.service.ts
index fc21ba9a5..e5f3ec795 100644
--- a/apps/production/src/analytics/analytics.service.ts
+++ b/apps/production/src/analytics/analytics.service.ts
@@ -822,6 +822,7 @@ export class AnalyticsService {
}
getGeoDetails(ip: string, tz?: string): IPGeoDetails {
+ // Stage 1: Using IP address based geo lookup
const data = lookup.get(ip)
const country = data?.country?.names?.en
@@ -836,6 +837,7 @@ export class AnalyticsService {
}
}
+ // Stage 2: Using timezone based geo lookup as a fallback
const tzCountry = timezones.getCountryForTimezone(tz)?.id || null
return {