Overview
The dashboard analytics API provides a comprehensive view of user career progress, including:- Goal completion tracking
- Skill development over time
- Networking statistics
- Event engagement metrics
- Recommendation performance
Requires authentication and completed career onboarding.
Authentication
Requires a valid Supabase authentication token in the request headers.Rate Limiting
- Limit: 20 requests per minute per user
- Window: Sliding window (1 minute)
- Response: HTTP 429 if rate limit exceeded
Request
HTTP Method
Query Parameters
Include personalized event recommendations in response
Number of upcoming events to analyze (max 100)
Response
Success Response (200)
Always
true for successful requestsError Responses
Examples
Basic Analytics Request
Analytics with Recommendations
Display Goal Progress
Analytics Computation
Goal Progress Calculation
Goal progress is calculated based on:- Events attended that align with goal
- Skills gained related to goal
- Time elapsed since goal set
- Completion criteria (goal-specific)
Skill Development Tracking
Skill learning progress tracks:- Events attended for each skill
- Practice time logged (if available)
- Proficiency level changes
- Peer comparison (optional)
Networking Metrics
Networking statistics include:- Direct connections made at events
- Follow relationships established
- Circle memberships joined
- Event attendance overlap with network
Cache Strategy
Cache Headers
Cache Invalidation
Analytics cache is invalidated when:- User tracks/untracks an event
- Career profile is updated
- Goal completion status changes
- Event attendance is marked
Performance Considerations
Processing Time
- Typical: 200-500ms
- With recommendations: 400-800ms
- Cold start: 800-1200ms (first request after cache expiry)
Optimization Strategies
- Analytics computed using database aggregation functions
- Tracked events fetched in lightweight mode (minimal fields)
- Parallel computation of independent metrics
- Incremental updates for frequently accessed data
Rate Limiting
To avoid hitting rate limits:- Cache analytics data on client for 2+ minutes
- Use
includeRecommendations=falsewhen only analytics needed - Fetch analytics once per dashboard visit, not per component mount
Related Endpoints
- GET /api/profile/career - Career profile used for analytics
- POST /api/events/tracked - Track events to update analytics
- GET /api/events/recommendations - Get recommendations separately