mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
add subdivision1/2, cities to query logic
This commit is contained in:
parent
6bacfa5892
commit
55a586fe27
16 changed files with 184 additions and 57 deletions
|
|
@ -44,7 +44,8 @@ export async function findSession(req) {
|
|||
throw new Error(`Website not found: ${websiteId}`);
|
||||
}
|
||||
|
||||
const { userAgent, browser, os, ip, country, device } = await getClientInfo(req, payload);
|
||||
const { userAgent, browser, os, ip, country, subdivision1, subdivision2, city, device } =
|
||||
await getClientInfo(req, payload);
|
||||
const sessionId = uuid(websiteId, hostname, ip, userAgent);
|
||||
|
||||
// Clickhouse does not require session lookup
|
||||
|
|
@ -59,6 +60,9 @@ export async function findSession(req) {
|
|||
screen,
|
||||
language,
|
||||
country,
|
||||
subdivision1,
|
||||
subdivision2,
|
||||
city,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -84,6 +88,9 @@ export async function findSession(req) {
|
|||
screen,
|
||||
language,
|
||||
country,
|
||||
subdivision1,
|
||||
subdivision2,
|
||||
city,
|
||||
});
|
||||
} catch (e) {
|
||||
if (!e.message.toLowerCase().includes('unique constraint')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue