mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Added country lookup for ip.
This commit is contained in:
parent
e6908d9e04
commit
822d46a2e0
6 changed files with 125 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { parseCollectRequest } from 'lib/utils';
|
||||
import { savePageView } from '../../lib/db';
|
||||
import { savePageView } from 'lib/db';
|
||||
|
||||
export default async (req, res) => {
|
||||
const values = parseCollectRequest(req);
|
||||
|
|
|
|||
|
|
@ -3,9 +3,15 @@ import { hash, parseSessionRequest } from 'lib/utils';
|
|||
|
||||
export default async (req, res) => {
|
||||
let result = { time: Date.now() };
|
||||
const { website_id, session_id, browser, os, screen, language, country } = parseSessionRequest(
|
||||
req,
|
||||
);
|
||||
const {
|
||||
website_id,
|
||||
session_id,
|
||||
browser,
|
||||
os,
|
||||
screen,
|
||||
language,
|
||||
country,
|
||||
} = await parseSessionRequest(req);
|
||||
|
||||
const website = await getWebsite(website_id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue