// Measure what matters with proper event tracking, funnels, cohorts, and metrics. Use when setting up analytics, tracking features, or understanding behavior.
| name | product-analytics |
| description | Measure what matters with proper event tracking, funnels, cohorts, and metrics. Use when setting up analytics, tracking features, or understanding behavior. |
| license | Complete terms in LICENSE.txt |
Measure what matters and make data-driven decisions.
The ONE metric that represents customer value
Examples:
Slack: Weekly Active Users
Airbnb: Nights Booked
Spotify: Time Listening
Shopify: GMV
Your North Star should: ✅ Represent customer value
✅ Correlate with revenue
✅ Be measurable frequently
✅ Rally the team
North Star Metric
├── Input Metrics (drive North Star)
│ ├── Acquisition
│ ├── Activation
│ └── Retention
└── KPIs (business health)
├── Revenue
├── Churn
└── LTV
// Track user actions
analytics.track('Button Clicked', {
button_name: 'signup',
page: 'homepage',
user_id: '123'
})
// Track page views
analytics.page('Homepage', {
referrer: document.referrer,
path: window.location.pathname
})
// Identify users
analytics.identify('user-123', {
email: 'user@example.com',
plan: 'pro',
created_at: '2024-01-15'
})
Sign-up Funnel:
1. Land on homepage: 10,000 (100%)
2. Click signup: 2,000 (20%)
3. Fill form: 1,000 (10%)
4. Verify email: 800 (8%)
5. Complete onboarding: 400 (4%)
Insights:
- Biggest drop: Homepage to signup (80% lost)
- Fix: Clarify value prop, add social proof
Week 1 Cohort (Jan 1-7):
- D1: 80% active
- D7: 40% active
- D30: 20% active
Week 2 Cohort (Jan 8-14):
- D1: 85% active (+5%)
- D7: 50% active (+10%)
- D30: 30% active (+10%)
Insight: Onboarding changes improved retention!
Good Retention:
- D1: 60-80%
- D7: 40-60%
- D30: 30-50%
- Flattening curve (good!)
Bad Retention:
- D1: 40%
- D7: 10%
- D30: 2%
- Steep drop-off (bad!)
## Tools
```yaml
Event Tracking:
- Mixpanel (best for products)
- Amplitude (good alternative)
- PostHog (open-source)
Session Recording:
- FullStory
- LogRocket
- Hotjar
A/B Testing:
- Optimizely
- VWO
- Google Optimize (free)
Executive Dashboard:
- North Star Metric (big number)
- Revenue (MRR/ARR)
- Key metric trends (graphs)
Product Dashboard:
- Active users (DAU/WAU/MAU)
- Feature usage
- Retention cohorts
- Funnels
Marketing Dashboard:
- Traffic sources
- Conversion rates
- Cost per acquisition
- ROI by channel
Great analytics: