6 min read

How to Monitor Event Volume in PostHog

Event volume is your pulse. If it drops unexpectedly, your users stopped interacting with critical flows. PostHog gives you multiple ways to see what's happening, from dashboards that update in real-time to API queries you can run on demand.

Viewing Event Volume in Insights

The fastest way to see trends in your event volume is the Event Volume insight, which shows counts over time with optional breakdowns.

Create an Event Volume Insight

Go to Insights > New Insight and select Event Volume. This creates a time-series chart showing event counts across your selected time range. PostHog automatically aggregates events by day, but you can change the interval to hourly or weekly.

javascript
// Query event counts via the API
const response = await fetch(
  'https://app.posthog.com/api/projects/{project_id}/events/?limit=100',
  {
    headers: {
      Authorization: 'Bearer {personal_api_key}'
    }
  }
);
const events = await response.json();
Fetch event data programmatically using the PostHog API

Filter by Event Name

In the Event Volume insight, use the Event dropdown to focus on specific events. For example, if you're tracking sign-ups, select only the user_signup event to see how sign-ups trend independently of page views.

javascript
// Capture events with consistent, descriptive names
posthog.capture('user_signup', {
  plan_tier: 'pro',
  signup_source: 'landing_page'
});

posthog.capture('user_login', {
  days_since_signup: 45
});
Use consistent event names so filtering in Insights works cleanly

Add Breakdowns to Segment Volume

In the Insights editor, click Breakdown by and select a property (e.g., plan_tier, signup_source, or $browser). This splits the event volume chart by category, so you can see if volume is dropping across all user segments or just one.

javascript
// Include rich properties when capturing events
posthog.capture('feature_used', {
  feature_name: 'export_to_csv',
  user_role: 'analyst',
  workspace_id: 'ws_123',
  session_duration_minutes: 22
});
Add contextual properties to enable meaningful breakdowns
Tip: Save your Event Volume insight to a dashboard for quick reference. Use the Save to dashboard button to add it alongside other key metrics.

Exploring Individual Events

When a chart shows odd spikes or drops, drill down into the raw events to understand what's really happening.

Open the Events Tab

Navigate to Events in the sidebar to see a live list of events. Each row shows the event name, timestamp, user, and properties. You can search by event name or filter by date range.

javascript
// Events appear in the explorer seconds after capture
posthog.capture('page_viewed', {
  page_path: '/dashboard',
  referrer: 'google.com',
  load_time_ms: 1200
});

// Immediately visible in the PostHog Events tab
Real-time visibility into captured events

Filter by Event Properties

Use the Event name filter to narrow to a single event type. For high-volume events, use Properties filters (e.g., only show events where user_role equals admin) to isolate patterns.

javascript
// Add structured properties for filterability
posthog.capture('api_call', {
  endpoint: '/v1/users',
  method: 'POST',
  response_time_ms: 145,
  status_code: 200
});

// Filter in UI to only show events where status_code == 500
All properties are filterable in the Events explorer
Watch out: The Events explorer slows down with millions of events. Use date range filters to narrow the time window before applying property filters.

Monitoring Event Volume Automatically

For production monitoring, you need to detect when volume deviates from normal. Use the PostHog API to build automated checks.

Query Event Counts Programmatically

Use the API to retrieve event counts for a specific time window. Compare the result to your baseline to detect anomalies. This is ideal for running on a cron job or in a serverless function.

javascript
// Query event counts for the last hour
async function getEventCount() {
  const oneHourAgo = new Date(Date.now() - 60 * 60 * 1000).toISOString();
  const now = new Date().toISOString();

  const response = await fetch(
    `https://app.posthog.com/api/projects/{project_id}/events/` +
    `?timestamp_after=${oneHourAgo}&timestamp_before=${now}`,
    {
      headers: { Authorization: 'Bearer {personal_api_key}' }
    }
  );

  const { results } = await response.json();
  return results.length;
}

const count = await getEventCount();
Fetch hourly event counts from the API for trend analysis

Set Up Alerting Based on Thresholds

Compare your hourly count to a baseline (e.g., average of the last 7 days). If it drops more than 20%, send an alert to Slack or PagerDuty. Store baselines in a simple database or file so you can update them as your product scales.

javascript
// Run this every hour
const BASELINE = 50000; // events per hour from a healthy day
const ALERT_THRESHOLD = 0.8; // Alert if volume drops to 80% of baseline

const count = await getEventCount();
if (count < BASELINE * ALERT_THRESHOLD) {
  await fetch('https://hooks.slack.com/services/YOUR/WEBHOOK/URL', {
    method: 'POST',
    body: JSON.stringify({
      text: `⚠️ Event volume low: ${count} events (baseline: ${BASELINE})`
    })
  });
}
Alert when volume deviates from your baseline
Tip: Set your baseline from a full week of production data, not a single day. Weekly volume often has patterns (weekends, holidays), so use the median, not the average.

Common Pitfalls

  • Monitoring only page_view events—these are high-volume and can mask drops in business-critical actions like purchases or sign-ups. Create separate alerts for conversion funnel events.
  • Skipping event properties—without context (plan tier, feature used, user role), breakdowns are useless and volume data tells you nothing. Attach properties to every event.
  • Setting arbitrary thresholds without baselines—'event volume is low' is meaningless. Establish your normal range first, then alert on deviations.
  • Forgetting timezone conversions in API queries—PostHog stores times in UTC. If your monitoring job runs in a different timezone, adjust query timestamps or you'll get off-by-one results.

Wrapping Up

You now have three tools for monitoring event volume: Insights for quick trends, the Events explorer for debugging anomalies, and APIs for automated alerts. The key is matching the tool to the question—dashboards for daily checks, raw events for investigation, and programmatic queries for production monitoring. If you want to track this automatically across tools, Product Analyst can help.

Track these metrics automatically

Product Analyst connects to your stack and surfaces the insights that matter.

Try Product Analyst — Free