Event frequency—how many times a user performs a specific action—is critical for understanding engagement and identifying power users. Amplitude makes this straightforward by combining event tracking with built-in segmentation and user properties. Here's how to capture and analyze event frequency for your product.
Track Events Consistently with the Amplitude SDK
The foundation of event frequency tracking is logging events reliably with the Amplitude SDK. Every event you track becomes part of your user's behavioral history.
Initialize Amplitude with Your API Key
Start by installing the Amplitude JavaScript SDK and initializing it in your application. You'll need your API key (available in your Amplitude project settings) and optionally a userId to associate events with a specific user.
import * as amplitude from '@amplitude/analytics-browser';
amplitude.init('abc123...', {
userId: 'user_12345'
});Use Consistent Event Names
Log the same action with the same event name every time. Amplitude groups events by exact string match when calculating frequency, so button_clicked and button_click are counted separately. Use clear, past-tense names.
// Track the same action with consistent naming
amplitude.track('dashboard_viewed');
amplitude.track('dashboard_viewed');
// Avoid: Different names for the same action
// amplitude.track('viewed dashboard'); // Won't aggregate together
// amplitude.track('view_dashboard'); // Separate event entirelyAttach Properties to Events
Add properties to capture context—which feature, button, or workflow. This lets you drill down into frequency per feature instead of just global event counts.
amplitude.track('button_clicked', {
'button_name': 'subscribe_cta',
'page_location': 'hero_section',
'user_plan': 'free'
});
amplitude.track('dashboard_viewed', {
'dashboard_id': 'sales_pipeline',
'view_source': 'navbar'
});Analyze Frequency in the Segmentation Chart
Once events are flowing, the Segmentation chart shows how many times users perform each action. Filter by frequency ranges to identify user segments.
Open Analytics > Segmentation
Navigate to Analytics > Segmentation and click Add Filter. Search for the event you want to measure (e.g., button_clicked). Amplitude auto-populates event counts.
// Your events must be flowing first
amplitude.track('button_clicked');
amplitude.track('button_clicked');
amplitude.track('button_clicked');
// Then in Amplitude UI:
// Analytics → Segmentation → Add Filter → Search "button_clicked"
// Amplitude shows event counts automaticallyFilter by Event Count
Click the filter dropdown, select Count, and set a threshold. For example, set operator to >= and value to 5 to find users who triggered the event 5 or more times.
// In Segmentation UI:
// 1. Click event filter
// 2. Choose 'Count' (not 'Last X Days')
// 3. Set operator: >= (or <, >, =, between)
// 4. Set value: 5
// Result: Users who triggered event 5+ timesSave or Export the Segment
Once filtered, save the segment as a cohort, export the user list, or chart it in an Insight for trending analysis.
// After filtering in Segmentation:
// 1. Click 'Save as Cohort' to store the segment
// 2. Click 'Download' to export user IDs
// 3. Click chart icon to add to a new InsightStore Frequency in User Properties for Persistent Tracking
User properties persist indefinitely, making them ideal for long-term frequency tracking. Set a property that accumulates counts and classifies users by engagement level.
Increment a Frequency Counter After Each Event
When a user performs an action, call track() then immediately call identify() with the Identify class to increment a user property. Use the .add() method to increase a numeric property.
import { Identify } from '@amplitude/analytics-browser';
// When user clicks the button:
amplitude.track('button_clicked');
// Increment the user property
const identify = new Identify();
identify.add('total_clicks_lifetime', 1);
amplitude.identify(identify);Classify Users Based on Frequency Thresholds
Set a user property that reflects their engagement segment (e.g., power_user or active_user). Update this whenever the frequency counter crosses a threshold.
import { Identify } from '@amplitude/analytics-browser';
function updateUserSegment(totalClicks) {
const identify = new Identify();
if (totalClicks >= 50) {
identify.set('engagement_tier', 'power_user');
} else if (totalClicks >= 10) {
identify.set('engagement_tier', 'active_user');
} else {
identify.set('engagement_tier', 'casual_user');
}
identify.set('last_segment_update', new Date().toISOString());
amplitude.identify(identify);
}
updateUserSegment(userTotalClicks);Segment by User Properties in Amplitude UI
In Segmentation, filter by User Properties instead of events. Search for your frequency property (e.g., engagement_tier) and set a value to segment users.
// In Amplitude UI:
// Analytics → Segmentation → Add Filter
// Filter type: User Properties
// Select: "engagement_tier"
// Operator: is
// Value: "power_user"
// Result: All users with engagement_tier = power_userCommon Pitfalls
- Using different event names for the same action. Amplitude counts
button_clicked,click, andbutton_clickas three separate events, splitting your frequency data. - Forgetting to call
identify()after tracking. User properties won't update unless you explicitly callamplitude.identify()with anIdentifyobject. - Relying on event count segmentation for historical analysis beyond 24 hours. Real-time counts reset daily; for 90-day frequency, use user property counters or SQL queries.
- Setting properties via event properties instead of
identify(). Event properties are event metadata, not user attributes. Useidentify()to set persistent user-level properties.
Wrapping Up
Event frequency tracking in Amplitude comes down to three steps: track events consistently with clear names, measure them in Segmentation, and use user properties for long-term accounting. Start with real-time segmentation, then layer in user property counters for deeper historical analysis. If you want to track and unify event frequency across all your analytics tools, Product Analyst can help.