add prefecture and city info

This commit is contained in:
Sergei Meza 2022-11-09 15:30:16 +09:00
parent 911eae897f
commit 75f49d3042
3 changed files with 26 additions and 17 deletions

View file

@ -47,7 +47,10 @@ export async function getSession(req) {
}
// const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
const { userAgent, browser, os, ip, country, device } = await getClientInfo(req, payload);
const { userAgent, browser, os, ip, country, prefecture, city, device } = await getClientInfo(
req,
payload,
);
let session_uuid = uuid(websiteId, hostname, ip, userAgent);
if (process.env.CROSSDOMAIN_TRACKING) {
@ -80,6 +83,8 @@ export async function getSession(req) {
screen,
language,
country,
prefecture,
city,
device,
ip,
user_agent: userAgent,