Sessions

Understand how user sessions are managed and tracked across your application.

Session Management

A session groups user activity within a time window. Sessions help you understand user engagement patterns.

Session Rules

RuleDescription
TimeoutSession expires after 30 minutes of inactivity
UTM ResetNew UTM parameters in URL start a new session (web)
App LifecycleSession resumes when app returns to foreground (mobile)

Automatic Session Tracking

The SDK automatically manages sessions - no manual intervention required.

The SDK automatically manages:

  • sessionId: Unique identifier for the session
  • pageNumberInSession: Sequential page count (1, 2, 3…)
  • UTM parameters: Captured at session start

Sessions are stored in a cookie (alke_s) that expires after 30 minutes of inactivity.

// Session data is included automatically in every event
// No manual configuration needed

User ID

The user ID is a persistent identifier stored on the device, generated automatically on first SDK initialization.

  • Stored in alke_u cookie
  • 30-day expiration (renewed on each visit)
  • Respects consent (cookie only set if consent granted)

UTM Parameters (Web)

Traffic source attribution is captured from URL parameters:

ParameterDescription
utm_sourceTraffic source (google, newsletter)
utm_mediumMarketing medium (cpc, email)
utm_campaignCampaign name
utm_termPaid keywords
utm_contentAd content variant
https://example.com/page?utm_source=google&utm_medium=cpc&utm_campaign=spring_sale

When a user arrives with UTM parameters:

  1. A new session is started
  2. UTM values are stored for the session duration
  3. All pageviews in the session inherit these values
Consent
UTM parameters require consent for purposes 1, 7, and 9 (store/access, advertising performance, audience understanding).