Event frequency answers a simple question: how often does a user actually do something? It's the difference between knowing someone visited and knowing they're actively using your product. Amplitude gives you multiple ways to calculate this—pick the one that fits your workflow.
View Frequency in the UI with Events Segmentation
The fastest path to seeing event frequency is right in Amplitude's dashboard.
Open Events Segmentation and select your event
Navigate to Analytics > Events Segmentation, then click Select event and pick the event you want to measure. Amplitude displays the total count over your date range.
// Track the event in your app first
amplitude.track('Feature_Used', {
feature_name: 'Export',
user_tier: 'pro'
});Switch to per-user breakdown to see the distribution
In the segmentation view, find the By user option in the breakdown dropdown. This shows you how many users performed the event 1 time, 2 times, 5 times, etc. The height of each bar is your frequency distribution.
// Example: if Events Segmentation shows 15 users with 3+ Feature_Used events,
// those are your power users. Frequency = 3 in this case.
const minFrequency = 3; // Minimum events to qualify as "power user"
const powerUserCount = 15; // From the segmentation graphCalculate Frequency with the REST API
For automated reports or dashboards, query the API to fetch event frequency data programmatically.
Use the User Search API to retrieve a user's events
Call the User Search API with a user_id. Amplitude returns the user's properties and recent events. You'll need your API key and secret key for Basic authentication.
const fetch = require('node-fetch');
const apiKey = 'YOUR_API_KEY';
const secretKey = 'YOUR_SECRET_KEY';
const userId = 'user_12345';
const auth = Buffer.from(`${apiKey}:${secretKey}`).toString('base64');
fetch(`https://api.amplitude.com/api/2/usersearch?user_id=${userId}`, {
headers: { 'Authorization': `Basic ${auth}` }
})
.then(res => res.json())
.then(data => console.log(data.events)); // Array of user's eventsFilter and count the target event type
Loop through the returned events array and count how many match your target event type. This number is your frequency.
const events = [
{ event_type: 'Feature_Used', event_time: 1706793600 },
{ event_type: 'Feature_Used', event_time: 1706880000 },
{ event_type: 'Page_View', event_time: 1706966400 }
];
const frequency = events.filter(
e => e.event_type === 'Feature_Used'
).length;
console.log('Feature_Used frequency:', frequency); // Output: 2Store Frequency as a User Property for Faster Segmentation
Instead of recalculating frequency every time, compute it once and save it as a user property. This makes segmentation instant.
Calculate frequency and set it as a user property
After you've counted the events, use setUserProperties() to store the frequency value on the user. This persists in Amplitude and can be used in cohorts and segmentation.
const calculatedFrequency = 42; // Example: user did something 42 times
amplitude.setUserProperties({
'feature_usage_count': calculatedFrequency,
'engagement_level': calculatedFrequency > 20 ? 'high' : 'low',
'last_frequency_calc': new Date().toISOString()
});Segment users by frequency in Cohorts
Now you can build a Cohort using the condition feature_usage_count > 20 to find your most engaged users. No calculation needed—it's a simple property lookup.
// Refresh frequency periodically (e.g., once per day via a backend job)
// This keeps the property current as events accumulate
function updateUserFrequency(userId, newFrequency) {
amplitude.setUserProperties({
'feature_usage_count': newFrequency,
'last_update': Date.now()
});
}[event_name]_count or [event_name]_frequency. This makes them searchable and recognizable when you build cohorts later.Common Pitfalls
- Ignoring the time period—frequency without a date range is meaningless. Always specify: last 7 days? last 30 days? all-time? These give very different numbers.
- Confusing total event count with unique user count—if 5 users each do an event twice, total frequency is 10, but only 5 users are involved.
- Not accounting for API limits—User Search returns only 10,000 events per user. If you need complete frequency for high-volume users, use Data Export instead.
- Updating user properties on every single event—this floods your API quota. Calculate frequency once per day, not per event.
Wrapping Up
Event frequency is your lens into who's actually using your product. Start with Events Segmentation for quick answers, move to the API for automation, and use user properties for fast cohort building. If you want to calculate and track event frequency automatically across all your tools, Product Analyst can help.