6 min read

How to Track Event Segmentation in Amplitude

Event segmentation in Amplitude lets you break down user behavior by specific properties—like plan tier, geography, or feature usage. Without properties attached to events, you're looking at aggregate counts with no context. To segment effectively, attach structured properties to every event you track, then use Amplitude's Events Segmentation dashboard to slice the data.

Send Event Properties via the Amplitude SDK

Segmentation starts with event properties. Use the Amplitude JavaScript SDK to track events with the context you need.

Install and Initialize the SDK

Add the Amplitude browser SDK to your project and initialize it with your API key. Store the instance for reuse across your app.

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

amplitude.init('YOUR_API_KEY');

// Set user properties once at signup or login
amplitude.setUserProperties({
  'plan': 'enterprise',
  'company_size': '100+',
  'country': 'US',
  'signup_month': 'January'
});
Initialize Amplitude and set user-level properties

Track Events with Segmentation Properties

When you track an event, pass a second argument with the properties you want to segment by. These properties become dimensions in Amplitude's Events Segmentation dashboard. Use clear, consistent names like feature_name, plan, or device_type.

javascript
// Track feature usage with segmentation properties
amplitude.track('Feature Used', {
  'feature_name': 'Advanced Reports',
  'feature_category': 'Analytics',
  'session_length_minutes': 12,
  'is_first_use': false
});

// Track a purchase with relevant segments
amplitude.track('Purchase Completed', {
  'product_tier': 'Professional',
  'annual_contract': true,
  'discount_code_used': false,
  'customer_segment': 'mid-market'
});
Track events with properties for segmentation analysis

Maintain Consistent Property Names Across Events

For segmentation to work, use the same property names across related events. If you send plan on one event and plan_type on another, Amplitude treats them as separate dimensions.

javascript
// Consistent property naming (good)
amplitude.track('Login', { 'plan': 'starter', 'country': 'GB' });
amplitude.track('Feature Used', { 'plan': 'starter', 'country': 'GB' });

// Inconsistent naming (avoid)
amplitude.track('Login', { 'user_plan': 'starter' });     // different property
amplitude.track('Feature Used', { 'plan': 'starter' });    // won't segment together
Naming consistency ensures reliable segmentation
Tip: Amplitude enforces a 1,000-property limit. Use semantic names like subscription_tier instead of tier_1 or t1. Avoid timestamps and user IDs as segmentation properties—they create noise.

Analyze and Filter by Segments

Once events are flowing with properties, use the Events Segmentation dashboard to visualize behavior across segments.

Open Events Segmentation in Amplitude

In Amplitude, navigate to Analytics > Events Segmentation. Select your event from the dropdown (e.g., 'Feature Used' or 'Purchase Completed').

javascript
// If you're fetching segmentation data via the Amplitude REST API:
const response = await fetch(
  'https://amplitude.com/api/2/events/segmentation?event=Purchase%20Completed&unit=day&limit=100',
  {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${AMPLITUDE_API_TOKEN}`
    }
  }
);
const data = await response.json();
console.log(data.data);  // Contains event counts segmented by properties

Choose Your Segmentation Dimension

In the Segmentation dropdown, select the property you want to break down by. For example, if you select plan, you'll see event counts for each plan tier (starter, professional, enterprise). Amplitude displays a chart with counts or other metrics per segment.

javascript
// Ensure your events send all properties you might segment by:
amplitude.track('Dashboard Accessed', {
  'dashboard_type': 'executive',
  'plan': 'enterprise',
  'industry': 'SaaS',
  'session_id': 'sess_abc123'
});

// In the UI, you can segment by:
// - dashboard_type (values: executive, team, personal)
// - plan (values: enterprise, professional, starter)
// - industry (values: SaaS, Fintech, etc.)

Apply Filters to Focus on Specific Cohorts

Use Filter to narrow the analysis. For example, filter to plan = 'enterprise', then segment by feature_name to see which features resonate with your largest customers. Filters work alongside segmentation to isolate specific user groups.

javascript
// Track with nested properties for fine-grained filtering:
amplitude.track('API Call Made', {
  'api_endpoint': '/analytics/query',
  'response_time_ms': 245,
  'plan': 'enterprise',
  'usage_tier': 'high',
  'success': true
});

// In the UI, you can:
// Filter to: plan = 'enterprise' AND usage_tier = 'high'
// Segment by: api_endpoint
// See which API endpoints are most used by power users
Watch out: High-cardinality properties (e.g., user IDs, session IDs, timestamps) create thousands of segments and become noise. Use them for filtering, not segmentation. Reserve segmentation for categorical properties with a handful of distinct values.

Common Pitfalls

  • Tracking events without properties. Segmentation requires event properties. Every interaction should include context like plan, country, or feature name.
  • Inconsistent property names. Sending user_plan on one event and plan on another breaks segmentation. Establish naming conventions and stick to them.
  • Using high-cardinality properties for segmentation. User IDs, timestamps, and request IDs generate thousands of segments and obscure real patterns. Use them for filtering instead.
  • Forgetting to set user properties. Event properties are event-specific, but user properties (like plan or company size) apply across all events and enable cohort-based analysis.

Wrapping Up

Event segmentation in Amplitude reveals user behavior patterns that raw aggregate counts hide. Attach consistent properties to every event, keep naming semantic, and avoid high-cardinality dimensions. Use the Events Segmentation dashboard and REST API to slice data by the segments that matter to your business. 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