Insights
Build ad-hoc analytics queries without saving to a dashboard. Insights is the most powerful page in Pug — use it to answer one-off questions and prototype charts before pinning them to a dashboard.
Path: /p/:projectId/insights
Query builder walkthrough
1. Select events
Choose one or more events from your project’s catalog. Multi-event queries compare series on the same chart or build funnels.
Single event: page_view → daily active users line chart
Multi event: page_view, click → compare two series
Funnel: signup_started → signup_completed → purchaseEvents only appear in the picker after they’ve been received at least once. Send test events via the SDK if your catalog is empty.
2. Apply filters
Filters narrow which events are included in the query.
| Filter scope | Applies to |
|---|---|
| Global filters | All selected events |
| Per-event filters | One specific event in a multi-event query |
Filter on any property — custom traits, auto-properties, or event properties:
Global: $geo.country = "US"
Per-event (purchase): revenue > 100
Per-event (page_view): $url contains "/pricing"Property types are inferred from your event schema. See Events to inspect available keys.
3. Choose visualization
| Type | Best for |
|---|---|
| Line | Trends over time |
| Area | Volume trends with filled area |
| Bar | Discrete period comparisons |
| Funnel | Step-by-step conversion |
| Retention | Cohort return rates |
| Table | Raw breakdown rows |
4. Set aggregation
| Aggregation | Computes |
|---|---|
| Count | Total event occurrences |
| Unique users | Distinct profiles per bucket |
| Sum | Total of a numeric property (e.g. revenue) |
| Average | Mean of a numeric property |
For revenue analysis, select Sum on the revenue property of purchase events.
5. Add breakdowns
Breakdowns split results by a property dimension:
Breakdown: $geo.country → one series per country
Breakdown: plan → one series per plan trait
Breakdown: $browser → browser distributionCombine breakdowns with any visualization. Funnel breakdowns show conversion rates per segment side-by-side.
Recipe: Daily active users
Events: page_view
Range: Last 30 days
Granularity: Day
Aggregation: Unique users
Visualization: LineRecipe: Signup funnel
Events: signup_started → signup_completed (in order)
Range: Last 7 days
Visualization: Funnel
Conversion window: 7 days
Breakdown: $utm_sourceSee the full Funnel analysis guide.
Recipe: Revenue by country
Events: purchase
Range: Last 30 days
Granularity: Day
Aggregation: Sum (property: revenue)
Breakdown: $geo.country
Visualization: BarSee E-commerce tracking.
Recipe: Day-1 retention
Visualization: Retention
Starting event: signup_completed
Return event: page_view
Range: Last 90 days
Granularity: WeekTime range and timezone
Insights uses the project timezone from Settings. All bucket boundaries align to that timezone — a “day” is midnight-to-midnight in project time, not UTC.
Override with a custom range for campaign-specific windows.
Export and reuse
| Action | Result |
|---|---|
| Copy query spec | JSON insight spec for the Insights API |
| Add to dashboard | Creates an insight tile on a Dashboard |
| Share link | URL with query state (team members with project access) |
The same query spec powers Overview KPIs, dashboard tiles, and API responses — build once, use everywhere.
Common issues
| Symptom | Fix |
|---|---|
| Event not in picker | Send at least one instance via SDK; check Events catalog |
| Empty chart | Widen time range; remove filters; confirm events exist in range |
| Funnel shows 0% conversion | Increase conversion window; verify event order matches actual user flow |
| Breakdown has too many rows | Add a global filter to narrow the segment first |