overcentric
Version:
Overcentric watches your website, product, and users - and tells you what matters and what to do about it.
16 lines (15 loc) • 748 B
TypeScript
/**
* Get or create a session ID scoped to the given project.
*
* A session is considered alive only while there has been genuine user activity
* within SESSION_TIMEOUT. We renew the activity timestamp from the real
* user-input signal (see activity.ts) rather than from the mere fact that
* getSessionId was called — otherwise background work (e.g. the recorder's
* periodic flush) would keep an idle session alive indefinitely.
*/
export declare function getSessionId(projectId: string): string;
/**
* Keep the activity cookie fresh while the user is genuinely active, so the
* session window reflects real interaction even between getSessionId calls.
*/
export declare function initSessionActivityTracking(projectId: string): void;