mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
initial setup. add crossdomain tracking.
This commit is contained in:
parent
0cb14f3f6c
commit
fa4130ebce
6 changed files with 196 additions and 2 deletions
|
|
@ -47,7 +47,10 @@ export async function getSession(req) {
|
|||
|
||||
const { userAgent, browser, os, ip, country, device } = await getClientInfo(req, payload);
|
||||
|
||||
const session_uuid = uuid(websiteId, hostname, ip, userAgent);
|
||||
let session_uuid = uuid(websiteId, hostname, ip, userAgent);
|
||||
if (process.env.CROSSDOMAIN_TRACKING) {
|
||||
session_uuid = uuid(websiteId, ip, userAgent);
|
||||
}
|
||||
|
||||
let sessionCreated = false;
|
||||
let sessionId = null;
|
||||
|
|
@ -76,6 +79,8 @@ export async function getSession(req) {
|
|||
language,
|
||||
country,
|
||||
device,
|
||||
ip,
|
||||
user_agent: userAgent,
|
||||
});
|
||||
|
||||
sessionId = session ? session.session_id : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue