Understanding how frequently users engage with features is critical for product decisions — it separates casual users from power users, and helps you spot drop-offs in usage patterns. Mixpanel makes this straightforward by letting you track event counts and frequency patterns through properties, then segment and analyze them in the UI.
Set Up Event Tracking with Frequency Properties
Start by installing the Mixpanel SDK and tracking events with properties that capture frequency data.
Install the Mixpanel JavaScript SDK
Add the Mixpanel SDK to your application. You can install it via npm or use the CDN. You'll need your project token from Settings > Project Token in the Mixpanel UI.
npm install mixpanel-browser
import mixpanel from 'mixpanel-browser';
mixpanel.init('YOUR_PROJECT_TOKEN');Track Events with a Frequency Count Property
When a user performs an action, track it with a property that captures how many times they've done it in a specific period. This gives you context for each event without creating extra database lookups.
const userFeatureCount = localStorage.getItem('feature_usage_count') || 0;
mixpanel.track('Feature Opened', {
'feature_name': 'Dashboard',
'usage_in_session': parseInt(userFeatureCount) + 1,
'frequency_category': parseInt(userFeatureCount) > 5 ? 'power_user' : 'casual'
});Use People Properties for Cumulative Frequency
Use people.increment() to maintain cumulative counts at the user level. This creates a user profile property that updates with each action, letting you track lifetime frequency without querying historical events.
mixpanel.people.increment('total_feature_opens', 1);
mixpanel.people.set_once('first_feature_open', new Date());
mixpanel.people.set('last_feature_open', new Date());Analyze Frequency Patterns in the Mixpanel UI
Once you're tracking frequency data, segment and visualize it using Mixpanel's analysis tools.
Segment Events by Frequency Properties
Go to Insights > Events, select your event, and use Segmentation to break down frequency by your custom property. This shows you how many users fall into each frequency category.
const response = await fetch('https://mixpanel.com/api/2.0/events/top', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});
const data = await response.json();Create a Frequency Distribution with Funnels or Retention
Use Funnels to see if high-frequency users progress further than low-frequency users. Or use Retention to track whether frequent engagement predicts long-term retention.
mixpanel.track('Feature Opened', {'frequency_category': 'power_user'});
mixpanel.track('Action Completed', {'frequency_category': 'power_user'});
mixpanel.track('Upgrade Clicked', {'frequency_category': 'power_user'});Filter Users by Cumulative Frequency
In Cohorts, create a segment based on total_feature_opens (or whatever cumulative property you set). Filter for users where total_feature_opens > 10 to find power users, then export or trigger campaigns.
const response = await fetch('https://mixpanel.com/api/2.0/cohorts/list', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});
const cohorts = await response.json();Export and Act on Frequency Data
Once you've identified frequency patterns, export the data or integrate it with your product.
Use the Data Export API for Custom Analysis
Export raw event data with frequency properties to your data warehouse or spreadsheet for deeper analysis. Use the Data Export API to pull events filtered by date range and properties.
const response = await fetch('https://data.mixpanel.com/api/2.0/export', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});
const events = await response.json();Trigger Notifications Based on Frequency Thresholds
Use Mixpanel's Boards or webhooks to monitor frequency metrics and alert your team when specific thresholds are crossed (e.g., when a user's frequency drops unexpectedly).
if (previousFrequency > currentFrequency) {
const payload = {
'user_id': userId,
'previous_frequency': previousFrequency,
'current_frequency': currentFrequency,
'alert_type': 'frequency_drop'
};
await fetch('https://your-api.com/webhook/user-churn-risk', {
method: 'POST',
body: JSON.stringify(payload)
});
}Common Pitfalls
- Tracking frequency as an event property counts events but doesn't let you query cumulative frequency easily. Use
people.increment()for persistent user-level counts. - Not including timestamp context: always track
last_action_dateor similar so you can tell if frequency is recent or stale. - Forgetting to initialize the SDK with your project token — this is the most common setup mistake and will silently fail.
- Over-tracking raw counts in properties instead of categorizing into buckets (e.g., 'power_user' vs. 'casual'). Categories are easier to analyze and cheaper to store.
Wrapping Up
Tracking event frequency in Mixpanel reveals who your power users are, predicts churn, and guides feature prioritization. Start by capturing frequency properties in events, analyze them with Segmentation and Cohorts, then export for deeper analysis. If you want to track this automatically across tools, Product Analyst can help.