Skip to content

Analytics

We use PostHog for analytics. Focus on emotional engagement, not traditional game metrics.

  • Client: /web/src/lib/posthog.js
  • Server: /web/src/lib/server/posthog.js
  • LLM calls auto-tracked via ask()
  • Only manual event: level_evaluation

Use category_object_action snake_case format:

import {client as posthog} from '$lib/posthog'
posthog.capture('scenario_level_complete', {
level_number: levelNumber,
emotional_resonance_score: evaluation.score
})

Follow PostHog conventions: lowercase, present tense verbs, snake_case.

Game Flow:

  • intro_new_game - User starts new game
  • intro_continue_game - User continues existing game
  • prechat_complete - User completes prechat interaction
  • call_accept - User accepts/connects to call
  • call_complete - User finishes call

Scenario Progression:

  • scenario_start - First time entering scenario
  • scenario_level_start - Enter level within scenario
  • scenario_level_complete - Complete level within scenario

Engagement:

  • engagement_long_pause - User hesitates >30s
  • connection_emotional_moment - Breakthrough moments
  • Every message (LLM pipeline covers this)
  • UI clicks
  • Debug logs from console.log

Track meaningful impact, not noise.