alumni_lookup

Flagship Events Feature

Overview

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.

How Flagship Events Are Identified

Flagship events are NOT a separate activity code. Instead, they are identified through a filter-based approach:

Identification Criteria

An engagement activity is considered a “flagship event” if it meets ALL of these conditions:

  1. Activity Code: event_attended
  2. Description Contains (case-insensitive) one of these keywords:
    • homecoming
    • hoco
    • reunion weekend
    • campaign launch
    • evening of hope
    • champion workshop

Example Flagship Events

Valid 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

Metrics Calculated

Flagship Event Count

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)

Flagship Follow-Up Count

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):

  1. 2+ Level 2+ activities total (including the flagship event), OR
  2. At least 1 Level 2+ activity that is NOT event_attended

This 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:

Query 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

Flagship Follow-Up Percentage

percentage = (flagship_followup_count / flagship_event_count) × 100

Goal: 30% of flagship event attendees should have Level 2+ follow-up engagement.

Importing Flagship Event Data

CSV Import Format

Use the standard engagement activity import with:

buid,activity_code,description,engagement_date
800123456,event_attended,Homecoming 2024,2024-10-15

Important Notes:

  1. Always use event_attended as the activity_code
  2. Include one of the flagship keywords in the description
  3. The keyword matching is case-insensitive
  4. Keywords can appear anywhere in the description

Adding New Flagship Event Keywords

To add new flagship event types:

  1. Edit app/controllers/engagement_stats_controller.rb
  2. Locate the flagship event query (appears twice in the file)
  3. Add new keyword to the ILIKE conditions:
.where("description ILIKE ? OR description ILIKE ? OR ...", 
       '%homecoming%', '%new_keyword%', ...)
  1. Update this documentation file
  2. Update .github/copilot-instructions.md with the new keyword

Display Location

Flagship event metrics are displayed:

Technical Implementation

Controller

app/controllers/engagement_stats_controller.rb

Two methods calculate flagship metrics:

  1. overview (lines ~376-400) - Main overview tab
  2. load_overview_data (lines ~1658-1680) - Data loading helper

View

app/views/engagement_stats/tabs/_overview.html.erb (lines ~49-55)

Database Schema

Uses existing engagement_activities table: