7 min read

How to Track Event Frequency in Amplitude

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.

javascript
import * as amplitude from '@amplitude/analytics-browser';

amplitude.init('abc123...', {
  userId: 'user_12345'
});
Initialize Amplitude SDK with your API key

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.

javascript
// 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 entirely
Always use the same event name to aggregate frequency correctly

Attach 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.

javascript
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'
});
Track events with contextual properties
Tip: Event names in the past tense read naturally in Amplitude. "Users who viewed dashboard 5+ times" flows better than "Users who view dashboard 5+ times."

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.

javascript
// 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 automatically
Events populate Segmentation filters automatically

Filter 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.

javascript
// 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+ times
Set frequency thresholds in the Segmentation UI

Save 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.

javascript
// 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 Insight
Save frequency-based segments for reuse
Watch out: Real-time event counts reset daily. For historical frequency ("total clicks in the last 90 days"), use user properties or SQL queries instead.

Store 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.

javascript
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);
Increment a user property after each event

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.

javascript
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);
Classify users into segments based on frequency

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.

javascript
// 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_user
Segment by user properties set from frequency counters
Tip: User properties never expire, so this approach gives you a permanent audit trail. Event count segmentation is ephemeral (24 hours), but user properties stick around indefinitely.

Common Pitfalls

  • Using different event names for the same action. Amplitude counts button_clicked, click, and button_click as three separate events, splitting your frequency data.
  • Forgetting to call identify() after tracking. User properties won't update unless you explicitly call amplitude.identify() with an Identify object.
  • 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. Use identify() 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.

Track these metrics automatically

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

Try Product Analyst — Free