5 min read

How to Visualize Event Frequency in Mixpanel

Event frequency tells you how often users are performing specific actions—whether it's logins, feature usage, or purchases. Mixpanel's Insights panel gives you multiple ways to visualize this pattern over time, spot trends, and identify when user behavior shifts.

View Event Frequency in Insights

The fastest way to see how often an event occurs is through Mixpanel's Insights report.

Navigate to the Events view

Go to Events > Insights in your Mixpanel project. This is where you analyze individual event patterns across your user base.

Select your event and date range

Choose the event you want to track from the dropdown, then set your date range. Mixpanel defaults to the last 30 days, but you can adjust this to match your analysis period.

Choose your visualization

Pick between Line, Bar, or Table view. Line charts work best for spotting frequency trends over time, while bar charts let you compare frequency across days or weeks.

javascript
// Track events consistently to get clean frequency data
mixpanel.track('button_click', {
  'button_name': 'checkout',
  'page': '/products',
  'timestamp': new Date().toISOString()
});
Track events with consistent names and properties for accurate frequency analysis
Tip: If you're not seeing data, check that the event is actually being fired. Use Mixpanel's Live View (in Events) to verify events are coming in real-time.

Segment Event Frequency by User Properties

Raw event frequency is useful, but breaking it down by user segments reveals which groups are most active.

Add a segmentation dimension

In your Insights report, click Add Segmentation. You can segment by user properties like country, plan_type, signup_date, or any custom property you've tracked.

Compare frequency across segments

Mixpanel splits the chart by your chosen dimension. You'll immediately see which segments have higher or lower event frequency—e.g., free users vs. paid users, or users by region.

javascript
// Set user properties so you can segment frequency reports by them
mixpanel.identify(userId);
mixpanel.people.set({
  'plan_type': 'enterprise',
  'signup_date': '2025-01-15',
  'country': 'US',
  'mrr': 5000
});

mixpanel.track('export_generated', {
  'export_format': 'csv'
});
Set user properties during identification to enable segmentation in Insights

Filter by property values

Use the Filters section to narrow down. For example, show only events from users with plan_type = 'enterprise' to isolate high-value customer behavior.

Watch out: Segmenting by a property with many unique values (like user_id) can slow down queries significantly. Stick to bounded properties like plan_type, region, or cohort.

Export Event Frequency Data for Custom Dashboards

If you need raw event frequency data for custom analysis or building dashboards elsewhere, use Mixpanel's Data Export API.

Get your Data Export credentials

Navigate to Project Settings > Access Control and copy your Project Token and Service Account Secret. These are required to authenticate Data Export API requests.

Call the Data Export API

Make an authenticated request to the export endpoint with your event name, date range, and credentials. The API returns raw events in JSONL format, which you can then aggregate locally.

javascript
const https = require('https');

const projectToken = 'your_project_token';
const secret = 'your_service_account_secret';
const auth = Buffer.from(`${secret}:`).toString('base64');

const fromDate = '2025-03-01';
const toDate = '2025-03-26';
const eventName = 'user_signup';

const url = `https://data.mixpanel.com/api/2.0/export?from_date=${fromDate}&to_date=${toDate}&event=${eventName}`;

const options = {
  hostname: 'data.mixpanel.com',
  path: `/api/2.0/export?from_date=${fromDate}&to_date=${toDate}&event=${eventName}`,
  headers: { 'Authorization': `Basic ${auth}` }
};

https.get(options, (res) => {
  res.on('data', (chunk) => {
    const events = JSON.parse(chunk);
    console.log(`Exported ${events.length} ${eventName} events`);
  });
});
Data Export API request with Basic auth to retrieve raw event data

Aggregate and visualize

Count the exported events by date, hour, or user property to calculate frequency. This gives you the flexibility to build custom visualizations in Tableau, Looker, or your own dashboards.

Tip: The Data Export API returns JSONL format (one JSON object per line). Parse it line-by-line if the dataset is large to avoid memory issues.

Common Pitfalls

  • Not tracking events consistently—if you track the same action under different event names, frequency data gets fragmented across multiple reports.
  • Missing user properties—without properties like plan_type or signup_date, you can't segment frequency meaningfully to identify high-value user behavior.
  • Ignoring the Data Export API rate limit—Mixpanel throttles Export requests; batch your exports and avoid querying the same date range repeatedly in short timeframes.
  • Confusing daily frequency with total count—frequency is *rate of occurrence over time*, not absolute numbers. A spike in frequency is different from a spike in total volume.

Wrapping Up

Event frequency is a fundamental metric for understanding engagement patterns. Whether you use Insights for quick analysis, segmentation to compare cohorts, or the Data Export API for deeper data work, Mixpanel makes it easy to visualize how often users engage with your product. 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