Set up comprehensive Real User Monitoring for my Netlify site:
-
Configure Netlify Analytics Pro (requires Pro account):
- Set up server-side analytics (no JS required)
- Track Core Web Vitals (LCP, FID, CLS, INP)
- Monitor top pages by performance score
- Create custom performance alerts
- Configure weekly performance reports
-
Integrate Web Vitals tracking:
- Install web-vitals library for detailed metrics
- Send metrics to Netlify Functions endpoint
- Store performance data in Netlify Blobs
- Create performance dashboard at /metrics
-
Set up Performance Alerts:
- Alert when P75 LCP > 3 seconds
- Notify if CLS increases by 20%
- Monitor JavaScript error rates
- Track 404s and broken resources
- Send alerts to Slack via Netlify Functions
-
Configure Geographic Performance Monitoring:
- Use Netlify Edge Functions to track region-specific metrics
- Identify slow regions with Edge geo data
- Compare performance across CDN nodes
- Optimize edge caching for slow regions
-
Create Custom Performance Dashboard:
- Build dashboard page using Netlify Functions
- Display real-time Core Web Vitals
- Show performance trends over time
- Include browser and device breakdowns
Show me the complete implementation with all code and configurations