mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 17:03:53 +00:00
draft analytics
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// get environment vars
|
||||
import 'dotenv/config.js';
|
||||
|
||||
import ua from 'universal-analytics';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
export const sessionId = nanoid();
|
||||
export const user = ua(process.env.ANALYTICS_ID);
|
||||
|
||||
// Track session
|
||||
user.set('uid', sessionId);
|
||||
|
||||
// Allows filtering by the 'Application?' field in GA
|
||||
user.set('ds', 'app');
|
||||
Reference in New Issue
Block a user