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!

add region / city to user/metainfo

Blue Mousec775f7c083e9
diff --git a/apps/production/src/user/user.controller.ts b/apps/production/src/user/user.controller.ts
index 95915cbfe..5d51fd288 100644
--- a/apps/production/src/user/user.controller.ts
+++ b/apps/production/src/user/user.controller.ts
@@ -926,10 +926,12 @@ export class UserController {
@Ip() reqIP: string,
): Promise<IMetaInfo> {
const ip = getIPFromHeaders(headers) || reqIP || ''
- const { country } = getGeoDetails(ip)
+ const { country, city, region } = getGeoDetails(ip)
return {
country,
+ city,
+ region,
...this.userService.getCurrencyByCountry(country),
}
}