Skip to main content

Overview

SkillRise tracks detailed learning analytics including time spent on pages, daily activity patterns, and per-course breakdowns. The system provides insights for both students and educators.

Time Tracking Model

TimeTracking Schema

server/models/TimeTracking.js
Each tracking record captures a single page session with duration in seconds, allowing granular analysis of learning patterns.

Tracking Implementation

Record Time Spent

Endpoint for frontend to report time spent on pages:
server/controllers/timeTrackingController.js
Duration is rounded to the nearest second to ensure consistent data storage.

Analytics Dashboard

Comprehensive Analytics Endpoint

Generate multi-faceted analytics from tracking data:
server/controllers/timeTrackingController.js
1

Fetch Records

Retrieve all time tracking records for the user, sorted by most recent.
2

Filter Active Pages

Exclude navigation and metadata pages to focus on learning activity.
3

Per-Page Aggregation

Group records by page and calculate total duration and visit count.
4

Daily Breakdown

Generate last 7 days of activity for time-series visualization.
5

Course Analysis

Extract course-specific time tracking from URL patterns.

Course Breakdown Analysis

Extract Learning Time by Course

server/controllers/timeTrackingController.js

Enrich with Course Metadata

server/controllers/timeTrackingController.js
Course breakdown separates learning time (video player) from quiz time, providing granular insights into study patterns.

Analytics Data Structure

Response Format

Educator Quiz Insights

Quiz Performance Analytics

Educators can view aggregated quiz performance for their courses:
server/controllers/quizController.js
1

Fetch Courses

Get all courses created by the educator.
2

Aggregate Results

Group quiz results by course and chapter combination.
3

Calculate Statistics

Compute average scores and performance group distributions.
4

Enrich Data

Add course and chapter titles for readable output.

Analytics Visualizations

Time Series

Daily activity over the last 7 days shows learning consistency patterns.

Course Distribution

Per-course time breakdown reveals which courses students engage with most.

Session Analytics

Total sessions and average duration per page provide engagement metrics.

Quiz Performance

Performance group distribution helps educators identify challenging chapters.

Key Metrics

Sum of all learning time (excluding navigation pages) measured in seconds.
Count of individual page visits, indicating engagement frequency.
Separate tracking for video player sessions and quiz attempts.
Quiz time is tracked per chapter, enabling fine-grained difficulty analysis.
Quiz results categorized as needs_review, on_track, or mastered.

Frontend Integration

Tracking Hook Example

client/src/hooks/useTimeTracking.js
Track time on component unmount to capture the complete session duration accurately.

Best Practices

Filter Noise

Exclude navigation and meta pages to focus analytics on learning content.

Minimum Threshold

Only track sessions longer than 5 seconds to avoid false data from quick navigations.

URL Pattern Matching

Use URL patterns (/player/:id, /quiz/:id/:chapter) to extract contextual metadata.

Aggregate Efficiently

Use in-memory aggregation for dashboard queries to minimize database load.

Privacy Considerations

All analytics are user-scoped and require authentication. Students can only view their own analytics, and educators can only view aggregate data for their courses.

Next Steps

AI Features

See how quiz performance feeds into AI recommendations

Course Management

Understand course structure tracked by analytics

Community

Engage with peers about learning strategies