Complete guide to the comprehensive analytics system that tracks your Morse code training progress across all training modes with word-level precision and character-level insights.
The TX Trainer Analytics system provides unprecedented insight into Morse code learning progress through comprehensive multi-level data collection and analysis. Every training session automatically captures detailed performance metrics across word accuracy, character-level errors, and session statistics.
Before: Character error counts were inflated (25 errors reported when user made only 5 actual character mistakes)
After: Accurate character-by-character comparison with proper error calculation plus comprehensive word-level analytics
Track words trained, correct, and incorrect per training mode
Individual character errors with substitution/missing/extra analysis
Speed (WPM), accuracy, duration, and progress tracking
Database Table: stats (legacy compatibility)
Captures:
Database Table: tx_word_sessions
Captures:
Database Table: tx_character_errors
Captures:
CREATE TABLE tx_word_sessions (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL, -- User identification
training_mode VARCHAR(50) NOT NULL, -- realWords, callsigns, etc.
words_trained INT NOT NULL DEFAULT 0, -- Total words attempted
words_correct INT NOT NULL DEFAULT 0, -- Words eventually correct
words_incorrect INT NOT NULL DEFAULT 0, -- Words failed after 3 attempts
accuracy_percentage DECIMAL(5,2) NOT NULL DEFAULT 0.00,
session_duration DECIMAL(8,2) NOT NULL DEFAULT 0.00,
character_errors INT DEFAULT 0, -- Character-level errors
total_characters INT DEFAULT 0, -- Total characters sent
speed_wpm DECIMAL(6,2) DEFAULT 0.00, -- Words per minute
effective_wpm DECIMAL(6,2) DEFAULT 0.00, -- Effective WPM
session_date DATETIME DEFAULT CURRENT_TIMESTAMP,
-- Performance indexes
INDEX idx_username (username),
INDEX idx_training_mode (training_mode),
INDEX idx_session_date (session_date),
INDEX idx_username_mode (username, training_mode)
)
CREATE TABLE tx_character_errors (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL,
mode VARCHAR(50) NOT NULL,
expected_char VARCHAR(10) NOT NULL, -- Character that should have been sent
received_char VARCHAR(10) NOT NULL, -- Character that was actually sent
error_type ENUM('substitution', 'missing', 'extra') NOT NULL,
word_context VARCHAR(50) DEFAULT NULL, -- Word being practiced
session_accuracy DECIMAL(5,2) DEFAULT 0.00,
session_total_words INT DEFAULT 0,
session_correct_words INT DEFAULT 0,
session_duration DECIMAL(8,2) DEFAULT 0.00,
date_created DATETIME DEFAULT CURRENT_TIMESTAMP,
-- Analytics indexes
INDEX idx_username (username),
INDEX idx_expected_char (expected_char),
INDEX idx_error_type (error_type),
INDEX idx_date_created (date_created)
)
Automatically called after each training session
Request Example:
{
"mode": "callsigns",
"words_trained": 25, // Total words attempted
"words_correct": 22, // Words eventually successful
"words_incorrect": 3, // Words failed after 3 attempts
"session_duration": 180.5, // Session length in seconds
"character_errors": 8, // Character-level errors
"total_characters": 125, // Total characters sent
"speed_wpm": 11.2, // Speed calculation
"effective_wpm": 10.1 // Effective speed
}
Query Parameters:
Example Queries:
# Overall last 30 days
GET /api/tx-word-analytics.php?timeframe=30d
# Callsign training last week
GET /api/tx-word-analytics.php?mode=callsigns&timeframe=7d
# All-time real words
GET /api/tx-word-analytics.php?mode=realWords&timeframe=all
Request Example:
{
"mode": "realWords",
"character_errors": [
{
"expected": "I",
"received": "H",
"type": "substitution",
"word": "INSIDE"
},
{
"expected": "O",
"received": "",
"type": "missing",
"word": "HELLO"
}
],
"total_words": 20,
"correct_words": 18,
"session_duration": 120.5,
"accuracy_percentage": 90.0
}
Response Includes:
{
"most_problematic_characters": [
{
"expected_char": "Q",
"error_count": 15,
"common_mistakes": "O, G, Y"
}
],
"error_types_breakdown": [
{"error_type": "substitution", "count": 45, "percentage": 67.2}
],
"mode_analysis": [...],
"recent_trends": [...]
}
Professional analytics interface: tx-trainer-analytics.html
The analytics system operates completely automatically. Every time a user completes a TX Trainer session, all three levels of analytics data are saved to the database without any user action required.
Session End Flow:
async function endSession() {
// ... session completion logic ...
// Save comprehensive analytics (AUTOMATIC)
await saveWordSessionAnalytics(sessionData); // ✅ NEW: Word analytics
await saveCharacterErrors(sessionData); // ✅ Character analytics
await saveSessionStats(sessionData); // ✅ Legacy compatibility
console.log('📊 All analytics data saved automatically');
}
"My callsign accuracy is only 87% while real words is 92% - I need more callsign practice."
"My speed improved from 9.2 WPM to 11.5 WPM over the last month!"
"I keep confusing Q with O - focus practice needed on these characters."
"Students are struggling with abbreviations mode - adjust curriculum."
Aggregate analytics across multiple users
"Assign more callsign practice to students with <85% accuracy."
Data-driven training recommendations
"Track overall class improvement and identify students needing help."
Comparative performance analysis
Run any TX Trainer session to automatically save analytics data
Visit the analytics dashboard to see your progress insights
Integrate analytics data with external tools via API endpoints
api/tx-word-analytics.php - Word analytics API
api/tx-character-analytics.php - Character analytics API
api/tx-character-errors.php - Character error saving
tx-trainer.html - Training interface with analytics