Skip to content

feat(analytics): overall company conversion funnel, interview cycle timing, dual monthly volume, and referral impact - #100

Merged
SagiEv merged 4 commits into
mainfrom
features/general
Nov 6, 2026
Merged

SagiEv merged 4 commits into
mainfrom
features/general

Conversation

@SagiEv

@SagiEv SagiEv commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Overview

This PR delivers a comprehensive upgrade to the Analytics module across frontend and backend tiers:

  1. Overall Company Conversion Funnel: Transitions from snapshot-only application metrics to a cumulative, company-deduplicated conversion funnel tracking outcomes (Active, Offer, Rejected, Awaiting) with multi-source interview resolution.
  2. Interview Cycle Timing Redesign: Replaces legacy stage-to-stage metrics with actionable process cycle indicators: Avg. Interview Cycle, Longest Interview Cycle (with company/role details), and Interviewed This Year.
  3. Dual-Series Monthly Volume: Upgrades the monthly application volume chart to render grouped dual bars: Applications Applied vs. Unique Companies Interviewed.
  4. Referral Impact Under Job Fit Insights: Evaluates the conversion rate, referral multiplier (lift), outcomes, and average job fit score for applications submitted with a referral versus direct applications.

Detailed Changes

1. Overall Company Conversion Funnel & Historical Tracking (cf54323)

  • Backend (applications.service.js):
    • Integrated applicationHistoryRepo.findLatestDatesByAppIds into getAnalyticsMetrics to capture historicalInterviewAppIds for applications that transitioned through interview stages even if subsequently rejected or archived.
  • Frontend Logic (analyticsCalculations.js):
    • Implemented calculateCompanyFunnelMetrics(applications, interviews, historicalInterviewAppIds).
    • Resolves multi-source interview truth across:
      1. Active application STATUS or STAGE.
      2. Linked entries in the interviews table (application_id and normalized company match).
      3. historicalInterviewAppIds from audit logs.
    • Deduplicates applications per company and partitions outcomes into:
      • Reached Interview: Offers, In Interview, Post-Interview Rejections.
      • No Interview Reached: Rejected without interview (Screening), Awaiting initial reply.
  • Frontend UI (AnalyticsPage.jsx, App.css):
    • Added toggle between Overall (By Company) and Current Snapshot (By App).
    • Interactive company outcome chips with color-coded badges and collapsible detail categories.

2. Interview Cycle & Dual-Series Monthly Volume (3b8c0c7)

  • Backend Timing Calculation (applications.service.js):
    • Replaced legacy HR to Technical and Technical to Final metrics with:
      • interviewCycle: Average calendar days from application date to resolution (offer/rejection) exclusively for interviewed applications.
      • longestInterviewCycle: Maximum interview cycle duration, tracking the company name, role, outcome, and total elapsed days.
  • Dual-Series Monthly Volume (analyticsCalculations.js, AnalyticsPage.jsx):
    • Implemented calculateMonthlyVolume grouping applications and unique company interview events across the last 8 months.
    • Built responsive SVG grouped dual-bar visualization:
      • Primary bar (Blue): Applications Applied.
      • Secondary bar (Green): Companies Interviewed.
      • Hoverable tooltips displaying month totals and interview company tags.
    • Timing card grid displaying: Time to 1st Interview, Avg. Interview Cycle, Longest Interview Cycle, Interviewed This Year, and Time to Reject.

3. Referral Impact Analysis (4d114ff)

  • Calculation Engine (analyticsCalculations.js):
    • Implemented calculateReferralMetrics(applications, interviews, historicalInterviewAppIds) evaluated at the application level:
      • Referred Interview Share: Percentage of interviewed applications that originated from a referral.
      • Interview Rate (Ref vs Direct): Conversion rate of referred applications vs direct applications.
      • Referral Advantage (Lift Multiplier): Quantitative multiplier ($\frac{\text{Rate}{\text{ref}}}{\text{Rate}{\text{direct}}}$).
      • Cohort Outcomes & Fit: Outcome partitioning (Offers, Active, Rejected) and average AI/deterministic Job Fit Score for each cohort.
  • UI & Layout (AnalyticsPage.jsx, App.css):
    • Integrated Referral Impact block beneath Job Fit Insights.
    • Added 3 KPI cards (👥 Referred Interview Share, 🚀 Interview Rate, 🏆 Referral Advantage).
    • Split cohort visualizer comparing With Referral vs Direct / No Referral with progress bars, outcome statistics, and application tags formatted as ${Company} • ${Role}.

Verification & Testing

Suite Scope Result
Frontend Unit Tests src/utils/__tests__/analyticsCalculations.test.js (Funnel, Monthly, Referral) ✅ 15/15 passed
Frontend Page Tests src/pages/__tests__/AnalyticsPage.test.jsx (Rendering, toggles, cohorts) ✅ 5/5 passed
Frontend Linter npm run lint (ESLint) ✅ 0 errors
Backend Test Suite backend/tests/** (Unit & Integration) ✅ 52 suites, 414 tests passed

Commits Included

  • cf54323 feat(analytics): add overall company conversion funnel metric and historical interview tracking
  • 3b8c0c7 feat(analytics): redesign timing metrics with interview cycle and add dual-series monthly volume
  • 4d114ff feat(analytics): add referral impact metrics under job fit insights

Related issues

Resolves #67
Resolves #72
Resolves #73
Resolves #75

@vercel

vercel Bot commented Nov 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
job-pilot Ready Ready Preview Nov 6, 2026 1:38pm UTC

@SagiEv SagiEv added the enhancement New feature or request label Nov 6, 2026
@SagiEv
SagiEv merged commit 54b33cf into main Nov 6, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4d114ff6 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

1 participant