Skip to Content

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 → purchase

Events 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 scopeApplies to
Global filtersAll selected events
Per-event filtersOne 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

TypeBest for
LineTrends over time
AreaVolume trends with filled area
BarDiscrete period comparisons
FunnelStep-by-step conversion
RetentionCohort return rates
TableRaw breakdown rows

4. Set aggregation

AggregationComputes
CountTotal event occurrences
Unique usersDistinct profiles per bucket
SumTotal of a numeric property (e.g. revenue)
AverageMean 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 distribution

Combine 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: Line

Recipe: Signup funnel

Events: signup_started → signup_completed (in order) Range: Last 7 days Visualization: Funnel Conversion window: 7 days Breakdown: $utm_source

See 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: Bar

See E-commerce tracking.

Recipe: Day-1 retention

Visualization: Retention Starting event: signup_completed Return event: page_view Range: Last 90 days Granularity: Week

See Retention analysis guide.

Time 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

ActionResult
Copy query specJSON insight spec for the Insights API
Add to dashboardCreates an insight tile on a Dashboard
Share linkURL 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

SymptomFix
Event not in pickerSend at least one instance via SDK; check Events catalog
Empty chartWiden time range; remove filters; confirm events exist in range
Funnel shows 0% conversionIncrease conversion window; verify event order matches actual user flow
Breakdown has too many rowsAdd a global filter to narrow the segment first

Further reading

Last updated on