Analytics Integration
Enrich insights with usage statistics from Amplitude, Mixpanel, or other MCP-compatible analytics tools.
Connect your analytics tool (Amplitude, Mixpanel, PostHog, or any MCP-compatible provider) to enrich insights with usage statistics. ProductSights maps product areas from feedback to analytics events and surfaces DAU, trends, and adoption data in the triage pipeline and insight detail view.
How it works
- Event catalog — ProductSights fetches your analytics event taxonomy daily and caches it.
- Event mapping — When an insight is triaged, the AI maps product areas (e.g., "export", "dashboard") to relevant analytics events. Manual mappings override AI mappings.
- Usage stats — ProductSights queries event statistics (unique users, daily volume, trend) and attaches them to the insight.
- Priority scoring — Insights affecting high-usage features get a priority boost; growing trends receive additional weight.
Setup
- Go to Settings → Analytics
- Click Add Integration
- Choose your provider (Amplitude, Mixpanel, PostHog, or Custom MCP)
- Configure the MCP server:
- Server command: e.g.,
npx - Server arguments: e.g.,
@amplitude/mcp-server - List events tool: Tool name for fetching the event catalog (e.g.,
list_events) - Query stats tool: Tool name for querying event statistics (e.g.,
query_event_stats) - Environment variables: JSON object with API keys (e.g.,
{"AMPLITUDE_API_KEY": "your-key"})
- Server command: e.g.,
- Click Create
- Click Test to verify the connection
- Click Sync to refresh the event catalog
MCP server requirements
Your analytics MCP server must expose two tools:
| Tool | Purpose | Expected arguments | Expected response |
|---|---|---|---|
list_events | Fetch event taxonomy | {} | JSON array of {eventName, description?, displayName?, category?, volume?} |
query_event_stats | Query usage stats | {eventNames: string[], timeRange: string} | JSON with events array and optional aggregated object |
Manual event mapping
You can override AI mappings in Settings → Analytics by editing an integration's mappings. Map product areas (e.g., "export") to specific event names from your catalog. Manual mappings always take precedence over AI-generated ones.
Refresh analytics
- Single insight: Open an insight and click Refresh in the Usage Analytics card.
- Bulk: Use the bulk refresh API to re-fetch analytics for multiple insights.
API endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/analytics-integrations | GET | List integrations |
/api/analytics-integrations | POST | Create integration |
/api/analytics-integrations/[id] | GET, PATCH, DELETE | Manage integration |
/api/analytics-integrations/[id]/test | POST | Test connection |
/api/analytics-integrations/[id]/sync-catalog | POST | Manual catalog sync |
/api/analytics-integrations/[id]/catalog | GET | List event catalog |
/api/analytics-integrations/[id]/mappings | GET, PUT | Event mappings |
/api/insights/[id]/refresh-analytics | POST | Refresh analytics for one insight |
/api/insights/bulk-refresh-analytics | POST | Queue bulk refresh |
Request bodies
PUT /api/analytics-integrations/[id]/mappings — create or update a mapping:
{
"productArea": "export",
"themeId": "optional-theme-id",
"eventNames": ["Export Clicked", "Export Completed"]
}
POST /api/insights/bulk-refresh-analytics — queue refresh for multiple insights:
{
"insightIds": ["insight-id-1", "insight-id-2"]
}