Skip to main content
Source code Package

Session Source

Standalone session detection and management that can be composed with any walkerOS source.

Installation

Install the packages:

Loading...

Configure in your code:

Loading...

Configuration

PropertyTypeDescriptionMore
storagebooleanEnable persistent storage for session/device IDs
consentstring | arrayConsent key(s) required to enable storage mode
lengthnumberSession timeout in minutes
pulsebooleanKeep session alive on each event
sessionKeystringStorage key for session ID
sessionStorage'local' | 'session'Storage type for session
deviceKeystringStorage key for device ID
deviceStorage'local' | 'session'Storage type for device
deviceAgenumberDevice ID age in days
cbfunctionCustom session callback function or false to disable

Detection Methods

The session source uses two complementary methods:

MethodStorageUse Case
WindowNonePrivacy-first, per-page session
StoragelocalStorageCross-page session tracking

Window-based Detection

Without storage, session detection relies on browser signals:

Navigation Type:

Loading...

Marketing Parameters:

UTM and other marketing parameters trigger session start:

Loading...

Storage-based Detection

With storage: true, sessions persist across page loads:

Loading...

Session Lifecycle:

┌─────────────────────────────────────────────────────────────┐
│ Session Timeline │
├─────────────────────────────────────────────────────────────┤
│ │
│ User visits Page 2 Page 3 30min idle │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ [Session 1] ─────────────────────────────► [Expires] │
│ id: abc123 │
│ │
│ User returns │
│ │ │
│ ▼ │
│ [Session 2] │
│ id: def456 │
└─────────────────────────────────────────────────────────────┘

Storage Keys:

KeyDefaultDescription
sessionKeyelbSessionIdlocalStorage key for session ID
deviceKeyelbDeviceIdlocalStorage key for device ID

Session Start Event

When a new session is detected, the source pushes:

Loading...

Session detection adapts to consent state:

Consent StateBehavior
No consentWindow-only detection (no storage)
Consent grantedStorage-based with device ID
Consent revokedFalls back to window-only
Loading...

Next Steps

💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.