Skip to content

PostHog Event Catalog

All backend analytics events tracked via PostHog. Events are defined in app/analytics/posthog_service.py and called via app/analytics/tracking_helper.py.

Acquisition & Onboarding

Event Method Key Properties
user_signed_up track_user_signed_up channel, persona_id, entry_path, utm_*
onboarding_started track_onboarding_started entry_path, utm_*
onboarding_step_completed track_onboarding_step_completed step_number, step_name (see Step Names below)
onboarding_companion_selected track_onboarding_companion_selected companion_id, compatibility_score
onboarding_activated track_onboarding_activated companion_id, activation_method (see Activation Methods below)

Onboarding Step Names

step_number step_name Trigger
1 name_entered User saves display_name in survey
2 survey_complete All survey fields filled (name, phone, q1, q2)
3 companion_selected User selects an assistant

Activation Methods

activation_method Description Call Site
imessage_web_survey User completed web survey, activated on first iMessage message_handler.py (pending activation check)
imessage_cold_text Cold text user activated at message 3+ message_handler.py (stranger mode)
group_chat_recognition User recognized from group chat, auto-activated on 1:1 message message_handler.py (group chat recognition)

Onboarding Funnel

Full funnel in PostHog: onboarding_startedonboarding_step_completed (x3) → onboarding_companion_selectedonboarding_activated

Cold text and group chat users skip the web funnel — they only fire onboarding_activated with the relevant activation_method.

Messaging & Engagement

Event Method Key Properties
message_sent track_message_sent persona_id, channel, is_group, message_length, has_photo
message_received track_message_received persona_id, channel, is_reflex, is_burst, memory_count
conversation_started track_conversation_started persona_id, channel, is_group, hours_since_last
conversation_ended track_conversation_ended persona_id, duration_sec, user_msg_count, companion_msg_count

Subscription & Revenue

Event Method Key Properties
subscription_started track_subscription_started plan_type, price_cents, is_trial
subscription_cancelled track_subscription_cancelled plan_type, days_active, total_messages
subscription_renewed track_subscription_renewed plan_type, price_cents, months_active

Superpowers & Integrations

Event Method Key Properties
superpower_enabled track_superpower_enabled superpower_id, superpower_category, requires_oauth
superpower_disabled track_superpower_disabled superpower_id, days_enabled, usage_count
superpower_executed track_superpower_executed superpower_id, status, execution_duration_ms
integration_connected track_integration_connected integration_type
integration_disconnected track_integration_disconnected integration_type, reason, days_connected

Companion & Relationship

Event Method Key Properties
companion_switched track_companion_switched from_companion, to_companion, days_with_previous
relationship_stage_changed track_relationship_stage_changed persona_id, from_stage, to_stage, trust_score, rapport_score

Free Tier

Event Method Key Properties
free_tier_limit_hit track_free_tier_limit_hit limit_type, current_count, limit

Memory

Event Method Key Properties
memory_created track_memory_created persona_id, memory_category, is_group_memory

Account

Event Method Key Properties
account_deleted track_account_deleted days_active, total_messages, subscription_status
account_deletion_cancelled track_account_deletion_cancelled days_since_deletion_request

Support

Event Method Key Properties
support_ticket_created track_support_ticket_created ticket_type, category

Person Properties

PostHog person properties are set automatically on certain events:

Property Set By Type
signup_date user_signed_up $set_once
entry_path user_signed_up $set_once
primary_channel user_signed_up $set_once
companion_id onboarding_companion_selected, companion_switched $set
subscription_status subscription_started, subscription_cancelled $set
plan_type subscription_started $set
relationship_stage relationship_stage_changed $set
trust_score relationship_stage_changed $set
rapport_score relationship_stage_changed $set
total_memories memory_created $set
{integration}_connected integration_connected/disconnected $set

Architecture

  • Service: PostHogService singleton in app/analytics/posthog_service.py
  • Helper: TrackingHelper in app/analytics/tracking_helper.py bridges app code to PostHog
  • Init/Shutdown: Managed in app/main.py lifespan
  • Safety: All tracking calls are wrapped in try/except - analytics never crash the message flow
  • PII: Phone numbers are hashed (SHA-256) before sending to PostHog