Files
ssessesse-ki-battle/constants/analytics.ts
T

19 lines
1.1 KiB
TypeScript

export const VISIT_SESSION_MS = 30 * 60 * 1000;
export const ACTIVITY_INTERVAL_MS = 60000;
export const ANALYTICS_BATCH_SIZE = 20;
export const ACTIVE_WINDOW_MS = 90000;
export const PRESENCE_INTERVAL_MS = 10000;
export const PRESENCE_SAVE_INTERVAL_MS = 5 * 60 * 1000;
export const PRESENCE_RETENTION_MS = 7 * 24 * 60 * 60 * 1000;
export const RETENTION_MS = 90 * 24 * 60 * 60 * 1000;
export const RETRY_QUEUE_LIMIT = 100;
export const RETRY_MAX_AGE_MS = VISIT_SESSION_MS;
export const RETRY_INTERVAL_MS = 5000;
export const MAX_EVENTS_PER_MINUTE = 120;
export const RETENTION_SWEEP_MS = 60 * 60 * 1000;
export const CLIENT_EVENTS = ['page_view', 'screen_view', 'ui_action', 'client_error', 'game_started', 'game_finished'] as const;
export const SCREENS = ['home', 'join', 'waiting', 'match', 'result', 'ranked-queue'] as const;
export const UI_ACTIONS = ['bot_start', 'room_create', 'room_join', 'rematch'] as const;
export const CLIENT_ERROR_CODES = ['storage_unavailable', 'connection_failed', 'renderer_failed'] as const;
export const CAMPAIGN_VALUES = ['friend', 'organic', 'social', 'email', 'launch'] as const;