The Flagship Events system identifies and tracks attendance at major university events to measure post-event engagement follow-up rates. This is displayed as GOAL 5 in the Engagement Stats overview.
Flagship events are NOT a separate activity code. Instead, they are identified through a filter-based approach:
An engagement activity is considered a “flagship event” if it meets ALL of these conditions:
event_attendedhomecominghocoreunion weekendcampaign launchevening of hopechampion workshopValid flagship event records in the database:
buid,activity_code,description,engagement_date
800123456,event_attended,Homecoming 2024,2024-10-15
800234567,event_attended,Hoco Weekend,2024-10-14
800345678,event_attended,50th Reunion Weekend,2024-06-01
800456789,event_attended,Campaign Launch Event,2024-09-20
800567890,event_attended,Evening of Hope Gala,2024-04-15
800678901,event_attended,Alumni Champion Workshop - Spring,2024-03-10
The total number of unique alumni (buid) who attended any flagship event during the selected time period.
Query Logic:
flagship_buids = EngagementActivity
.where(activity_code: 'event_attended')
.where(engagement_date: @start_date..@end_date)
.where("description ILIKE ? OR description ILIKE ? OR ...",
'%homecoming%', '%campaign launch%', '%reunion weekend%',
'%hoco%', '%evening of hope%', '%champion workshop%')
.distinct
.pluck(:buid)
The number of flagship event attendees who had additional Level 2+ engagement beyond just attending the flagship event.
Criteria for follow-up (either condition qualifies):
event_attendedThis ensures that simply attending the flagship event doesn’t automatically count as follow-up engagement. Alumni must demonstrate additional engagement to be counted.
Level 2+ Activities:
info_update, giving_level_2, event_attended, campus_visit, digital_signupgiving_level_3, board_member, alumni_panelistgiving_level_4, giving_level_5Query Logic:
flagship_followup_count = EngagementActivity
.where(buid: flagship_buids)
.where(activity_code: level_2_plus_codes)
.where('engagement_date >= ?', @start_date)
.group(:buid)
.having('COUNT(*) >= 2 OR COUNT(CASE WHEN activity_code != ? THEN 1 END) >= 1', 'event_attended')
.count
.keys
.count
percentage = (flagship_followup_count / flagship_event_count) × 100
Goal: 30% of flagship event attendees should have Level 2+ follow-up engagement.
Use the standard engagement activity import with:
buid,activity_code,description,engagement_date
800123456,event_attended,Homecoming 2024,2024-10-15
Important Notes:
event_attended as the activity_codeTo add new flagship event types:
app/controllers/engagement_stats_controller.rb.where("description ILIKE ? OR description ILIKE ? OR ...",
'%homecoming%', '%new_keyword%', ...)
.github/copilot-instructions.md with the new keywordFlagship event metrics are displayed:
XX.X% (Y of Z)
app/controllers/engagement_stats_controller.rb
Two methods calculate flagship metrics:
overview (lines ~376-400) - Main overview tabload_overview_data (lines ~1658-1680) - Data loading helperapp/views/engagement_stats/tabs/_overview.html.erb (lines ~49-55)
Uses existing engagement_activities table:
buid (string) - Alumni identifieractivity_code (string) - Must be ‘event_attended’description (text) - Event name with keywordengagement_date (date) - Event date