Usage Analytics and Statistics #33

Closed
opened 2026-02-13 18:36:47 +03:00 by NiXTheDev · 1 comment
NiXTheDev commented 2026-02-13 18:36:47 +03:00 (Migrated from github.com)

Implement usage analytics to track popular commands and bot usage patterns.

Scope

Collect and display usage statistics using only SQLite. No external analytics services.

Data to Collect

  • Commands per day/hour
  • Most popular sed patterns
  • Unique active users
  • Average response time
  • Error rates
  • Most active chats

Implementation

  1. Create analytics table in SQLite
  2. Track command usage with timestamps
  3. Aggregate data periodically
  4. Add /stats command for users to see basic stats
  5. Add detailed stats for admin commands

Storage

  • Use existing SQLite database
  • Store aggregated data (not raw logs) to save space
  • Automatic cleanup of old analytics data

User Features

  • /stats - Show user personal stats (commands used, patterns created)
  • Anonymous aggregation only

Privacy

  • No personally identifiable information stored
  • Users can opt-out (if they really want to)
  • Data retention configurable

Configuration

  • ANALYTICS_ENABLED - Enable analytics (default: true)
  • ANALYTICS_RETENTION_DAYS - Data retention (default: 30)

Testing

  • Test analytics collection doesn't impact performance
  • Verify aggregation accuracy
  • Test data cleanup
Implement usage analytics to track popular commands and bot usage patterns. ## Scope Collect and display usage statistics using only SQLite. No external analytics services. ## Data to Collect - Commands per day/hour - Most popular sed patterns - Unique active users - Average response time - Error rates - Most active chats ## Implementation 1. Create analytics table in SQLite 2. Track command usage with timestamps 3. Aggregate data periodically 4. Add /stats command for users to see basic stats 5. Add detailed stats for admin commands ## Storage - Use existing SQLite database - Store aggregated data (not raw logs) to save space - Automatic cleanup of old analytics data ## User Features - /stats - Show user personal stats (commands used, patterns created) - Anonymous aggregation only ## Privacy - No personally identifiable information stored - Users can opt-out (if they really want to) - Data retention configurable ## Configuration - ANALYTICS_ENABLED - Enable analytics (default: true) - ANALYTICS_RETENTION_DAYS - Data retention (default: 30) ## Testing - Test analytics collection doesn't impact performance - Verify aggregation accuracy - Test data cleanup
NiXTheDev commented 2026-02-13 18:51:41 +03:00 (Migrated from github.com)

No, no metrics as a whole, we already have performance of the chain, that is enough in my opinion

No, no metrics as a whole, we already have performance of the chain, that is enough in my opinion
Sign in to join this conversation.
No description provided.