Top Engaged Alumni System
Overview
The Top Engaged Alumni system provides a sophisticated ranking mechanism to identify the most active and committed alumni based on their engagement activities, with built-in protections against “gaming” the system.
Key Features
Time Period Filtering
- 30 Days: Recent short-term engagement
- 6 Months: Medium-term engagement patterns (default)
- 1 Year: Long-term engagement view
- All Time: Complete engagement history
Scoring System
Level-Based Points
- Level 0: 0 points (inactive/administrative)
- Level 1: 1 point (basic engagement like email clicks)
- Level 2: 3 points (meaningful engagement like event attendance)
- Level 3: 7 points (significant engagement like panel participation)
- Level 4: 10 points (highest engagement like major giving)
Activity Caps (Anti-Gaming Protection)
To prevent manipulation of rankings through repetitive low-level activities:
- Email Clicks: Maximum 5 count toward score and activity count
- Event RSVPs: Maximum 2 count toward score and activity count
- All Other Activities: No caps applied
The ranking uses a “distance” calculation that balances both engagement quality (score) and breadth (activity count):
Distance = √((score × 1.5)² + (capped_activity_count × 1.0)²)
This ensures alumni with both high scores AND diverse engagement activities rank highest.
Changes Made (August 2025)
Removed Features
- Bonus Point System: Eliminated all bonus points (previously +5 for event attendance, +2 for email engagement)
- Threshold-Based Bonuses: Removed email click and event attendance bonus thresholds
Enhanced Features
- Time Period Filtering: Added dropdown to filter by different time periods
- Consistent Capping: Activities over caps are excluded from BOTH score AND activity count
- Distance-Based Ranking: Sort by combined score instead of just raw points
Implementation Details
Service Classes
TopEngagedAlumniService: Main service handling time period filtering and ranking
EngagementScoreCalculator: Core scoring logic with capping and distance calculations
Controller Updates
AlumniController#top_engaged: Handles time period parameters and passes options to view
View Components
- Time Period Dropdown: Auto-submitting form for period selection
- Capped Activity Display: Shows which activities are “over cap limit”
- Filtered Engagement Breakdown: Shows only activities within selected time period
Usage
For Developers
# Get top 50 alumni for the last year
service = TopEngagedAlumniService.new(limit: 50, time_period: '1_year')
results = service.top_alumni
# Each result contains:
# - alum: Alumni record
# - score: Calculated score with caps applied
# - activity_count: Capped activity count
# - distance: Combined score for ranking
# - filtered_activities: Activities within time period
For Users
- Navigate to
/alumni/top_engaged
- Select desired time period from dropdown
- View ranked list with engagement breakdowns
- Expand individual rows to see detailed activity history
Database Dependencies
alumni table with buid primary key
engagement_activities table with buid, activity_code, engagement_date
engagement_types table with code, level (0-4)
UI Enhancements
Engagement Stats Breakdown Page
The breakdown page (/engagement_stats?tab=breakdown) displays engagement activities organized by level with point values clearly indicated:
- Level headers show point values: “Level 1 (1 pt)”, “Level 2 (3 pts)”, “Level 3 (7 pts)”, “Level 4 (10 pts)”
- Point values are pulled from
EngagementType::LEVEL_POINTS constant to ensure consistency
- Proper pluralization: “pt” for 1 point, “pts” for multiple points