6 min read

How to Monitor Event Frequency in Mixpanel

Knowing how often users trigger specific actions is critical for spotting trends, detecting issues, and validating feature adoption. Mixpanel makes it straightforward to monitor event frequency—whether you're checking user behavior in real time or analyzing trends over days.

Track Events with the Mixpanel SDK

Before you can monitor frequency, you need to send events to Mixpanel. The JavaScript SDK handles this with a simple track call.

Initialize the Mixpanel SDK

Set up the Mixpanel JavaScript SDK in your app. Replace YOUR_TOKEN with your actual project token from Settings > Project Token.

javascript
import mixpanel from 'mixpanel-browser';

mixpanel.init('YOUR_TOKEN', {
  track_pageview: true,
  persistence: 'localStorage'
});
Initialize Mixpanel SDK with your project token

Send Events to Track User Actions

Call mixpanel.track() whenever a user performs an action you want to monitor. Pass the event name and any properties that provide context.

javascript
// Track a user signing up
mixpanel.track('User Signup', {
  plan: 'pro',
  signup_source: 'landing_page'
});

// Track a user viewing a dashboard
mixpanel.track('Dashboard Viewed', {
  dashboard_id: '12345',
  view_duration_seconds: 45
});
Track events with relevant properties for analysis

Use Super Properties for Consistent Context

Set super properties (user-level attributes) that attach to every event. This helps you filter and segment event frequency by user type.

javascript
mixpanel.register({
  user_type: 'premium',
  organization_id: 'org_789',
  region: 'us-east'
});

// Now all subsequent events include these properties
mixpanel.track('Report Generated');
Register super properties that attach to all events
Tip: Test your event tracking with the Live View in Mixpanel's Events page to confirm events are hitting your project before analyzing frequency.

Monitor Event Frequency in the Mixpanel UI

Once events are flowing, use Mixpanel's built-in reports to visualize frequency trends.

Open Events > Segmentation Report

Navigate to Reports > Events > Segmentation (or use Events in the left sidebar). This shows event count over time, segmented by properties.

javascript
// Validate events via the Data API
const response = await fetch(
  'https://mixpanel.com/api/2.0/events?token=YOUR_TOKEN'
);
const events = await response.json();
console.log('Events tracked:', events);
Optionally fetch event list via the API to validate setup

Select Your Event and Time Range

Choose the event you want to monitor (e.g., User Signup, Dashboard Viewed). Set the time range (last 7 days, last 30 days, or custom).

javascript
// Query event frequency data programmatically
const params = new URLSearchParams({
  from_date: '2026-03-20',
  to_date: '2026-03-26',
  event: 'User Signup',
  unit: 'day',
  token: 'YOUR_TOKEN'
});

const url = `https://data.mixpanel.com/api/2.0/export?${params}`;
const data = await fetch(url).then(r => r.json());
Use the Data Export API to pull frequency data by day

Add Segments to Break Down Frequency by User Attributes

Click Add Segment and choose a property (e.g., plan, region, user_type). This breaks event frequency into cohorts so you can see which user groups trigger events most often.

javascript
// Track events with segmentation properties
mixpanel.track('Feature Adopted', {
  feature_name: 'advanced_analytics',
  plan: 'pro',
  days_since_signup: 14,
  region: 'us-east'
});

// In the UI, segment by "plan" to compare frequency across tiers
Include properties in track() calls to enable dashboard segmentation
Watch out: Event frequency can spike during deploys or testing. Filter by user_type or environment in your dashboard to exclude internal traffic.

Set Up Alerts for Unusual Frequency Changes

Real-time monitoring is best—catch frequency drops before they become problems.

Create a Metric in Mixpanel Alerts

Go to Settings > Alerts and create a new alert rule. Choose the event you want to monitor and set a threshold (e.g., 'alert if daily event count drops below 100').

javascript
// Custom alerting by polling the Data Export API
setInterval(async () => {
  const response = await fetch(
    'https://data.mixpanel.com/api/2.0/export?' +
    'from_date=2026-03-26&to_date=2026-03-26&' +
    'event=User%20Signup&token=YOUR_TOKEN'
  );
  const data = await response.json();
  const todayCount = data.length;
  
  if (todayCount < 100) {
    console.error('Low signup frequency alert');
    // Send to Slack, email, or webhook
  }
}, 3600000); // Check every hour
Implement custom alerting by polling the Data Export API hourly
Tip: Combine Mixpanel alerts with Slack or PagerDuty integration for immediate notifications when frequency anomalies occur.

Common Pitfalls

  • Forgetting to set super properties—you'll track volume but miss context needed to segment by user type or plan.
  • Not filtering out internal or test events—unfiltered metrics inflate frequency and create false positives.
  • Checking frequency without proper time granularity—switching from hourly to daily buckets masks real-time issues.
  • Assuming high frequency equals high impact—validate that frequency correlates with retention, revenue, or user satisfaction.

Wrapping Up

You now have three ways to monitor event frequency in Mixpanel: real-time dashboards with Events > Segmentation, programmatic access via the Data Export API, and proactive alerts. This setup lets you spot adoption trends, catch drops early, and debug feature issues. If you want to track event frequency automatically across tools and link it to product metrics, Product Analyst can help.

Track these metrics automatically

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

Try Product Analyst — Free