DoomAnalytics

Analytics helper for calculating and logging doom scrolling metrics and user engagement statistics.

This singleton object provides methods to calculate various behavioral metrics from stored statistics and log them as analytics events. These metrics help understand user engagement patterns and the effectiveness of interventions. Key metrics include:

Key Metrics Tracked

  • Doom Session Ratio: Proportion of sessions identified as problematic scrolling (true_doom_sessions / total_sessions)
  • Warning Response Ratios: User responses to intervention warnings (take break vs. continue scrolling)
  • Cooldown Completion: How often users complete the cooldown period after starting it
  • Grace Period Usage: How frequently users utilize the grace period feature
  • App Reopen Rate: How often users reopen the app shortly after taking a break
  • Global Take Rest Ratio: Overall tendency to take breaks when prompted

All metrics are calculated based on daily statistics stored in [ScrollTimeStore] and logged using the [Analytics] service for further analysis.

Since

1.0

See also

for event logging implementation

for data storage and retrieval

Functions

Link copied to clipboard

Calculates and logs the ratio of completed cooldowns to started cooldowns.

Link copied to clipboard

Calculates and logs the ratio of doomscrolling sessions to total sessions for the current day.

Link copied to clipboard

Calculates and logs the global ratio of take-rest actions to total popups shown.

Link copied to clipboard

Calculates and logs the ratio of grace period usage to cooldown starts.

Link copied to clipboard

Calculates and logs the ratio of successful interventions where users didn't return immediately.

Link copied to clipboard

Calculates and logs the ratio of app reopens within 2 minutes after taking a break.

Link copied to clipboard

Calculates and logs the ratio of users who chose to continue scrolling after the first warning.

Link copied to clipboard

Calculates and logs the ratio of users who chose to take a break after seeing the first warning.

Link copied to clipboard

Calculates and logs the ratio of users who chose to continue after the second warning.

Link copied to clipboard

Calculates and logs the ratio of users who chose to take a break after the second warning.